ODBC connection error: Data source name not found and default driver not specified

Source: Internet
Author: User
Tags driver manager odbc odbc connection

An error occurred while the program was using ODBC to connect to the database:

ERROR [IM002] [MICROSOFT][ODBC driver Manager] did not discover the data source name and did not specify a default driver.

What causes it?

I use the "Delphi+sql server database application instance full resolution" with the routine test, found unable to connect to the database.
Prompts the communication module to drive the problem.
Environment: Win7_x86 + SQL Server2000 + Delphi 7.
Workaround:

SQL Server 2000

1. Restore the database through all tasks, database.
2. Login with security settings, set default data to Xqwy.

Odbc
1. Open Control Panel, ODBC data Source Administrator

2. Add, select SQL Server

3. Name: Database name Description: Database description Server: computer name

4. Next save OK.

5. Test: Delphi 7 Create a ADOcon control and double-click the control.

6.Use Connection String--Build

7. Connection: Using the data source name: Xqwy
User name: SA

Password: SA

Test connection, test connection succeeded.

================================ Reference ==================================

First, the operating environment of the next program is described. The operating system is a WIN8 64-bit,. NET 4.0 program.

Progress one, open the data Source tool in Control Panel, and do not find the corresponding driver name in the driver, then download and install the 64-bit ODBC driver, and modify the corresponding ODBC connection string based on the driver name in the driver list. The above error is still indicated after the test. Even according to expert guidance, the use of 64-bit system-specific ODBC connection string, still error.

Progress two, and suddenly think it will be related to the. NET program? Because of some control compatibility issues, the program runs under a 64-bit operating system, but is actually running in 32-bit mode. Will this be the root of the problem? Try to download the 32-bit ODBC driver and install it. Test the connection, success!

Cause analysis: Combining previously seen phenomena (the "Set up ODBC data source" tool in the WIN8 64-bit system is actually divided into 32-bit and 64-bit two programs), guess the reason: The ODBC driver in WIN8 64-bit system is divided into 32-bit and 64-bit separate management, A program running in 32-bit mode only calls the 32-bit ODBC driver, so 64-bit programs can only invoke 64-bit ODBC drivers.

ODBC connection error: Data source name not found and default driver not specified

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.