Configure ODBC Data sources

Source: Internet
Author: User
Tags dsn

ODBC (Open Database Connectivity)

It can be seen from the literal meaning that ODBC is equivalent to an intermediate protocol, which can connect to various databases, and even include Excel and text. It provides a unified method of use for the program. If the program uses ODBC to operate the actual database, the program can almost always be renewed regardless of whether the background database is DB2 or SQL Server or has been upgraded.

The following describes how to establish an ODBC data source connection.

First, find the ODBC data source drive. If your system is WINXP or win7 32-bit, control panel-management tools-Data Source (If your system is win7 64-bit, C: \ windows \ syswow64, find odbcad32.exe, open is, many friends may have encountered this situation, in win7 64-bit control panel or system32 odbc32, can only add SQL Server ), after opening the interface (such ):

You can select the type (User DSN, system DSN, and file DSN) of The DSN to be added. The Add button on the right of a single machine will pop up the select database driver Type dialog box (for example ):

Select the database type you want to add (Here we use Microsoft Access driver as an example:

Enter the data source name and description, and click "select" to select the path of your database file. If you need to set a password, click "advanced" to set the password. After everything is ready, click OK. The ODBC data source is successfully configured. No matter which program you can access your database, it will be easy and unobstructed!

 

To add an SQL Server database as an example (create a file DSN), select "SQL Server" in the "Create a new data source" dialog box, And next:

Enter the data source name. Note that this data source name is the name of the DSN File in the string to connect to the database in the Code: connectstring = "filedsn = student. DSN; uid = sa; Pwd = password ", click" Next ":

Click "finish ":

Enter the description of the data source and select the local server. If there is no local server, you can find control panel-Administrative Tools-service, and enable SQL-related services on the "extension" tab. Click "Next ":

Select or enter SQL verification. Next step:

Change the default database in SQL Server, and click "Next ":

Click "finish ":

Click Test Data Source (T). The test is successful!

 

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.