On Wiring Up an ADO Data Control - Preparatory Steps (Page 2 of 4 )
Creating a DataLink file
Create an empty text document and rename it AccLink.udl (you may use any other name but keep the .udl extension). The operating system may warn you that the file may be unusable if renamed. Ignore this warning.
Double click this file on the desktop where it was created. It opens the Data Link Properties window with the default tab Connection exposed as shown in the next picture. The three items that need information are clearly marked. When this window is open the default provider is the Microsoft OLEDB Provider for ODBC drivers.

Since we are creating a connection to a Jet data source we need to choose the proper Provider. Click on the Provider tab. This shows all the installed drivers on the machine.

Click on the Microsoft Jet 4.0 OLE DB Provider and click on the button which will open the window shown in the next picture. You may note that the Connection tab items are different from the default, since the connection depends on the Provider. You may use the ellipsis button (...) to browse to the location of the MDB file, in this case Northwind.mdb. You may also test the connection by hitting the Test Connection button.

Click on the OK button for the Microsoft Data Link window, and the DataLink Properties window. This completes your task of creating a DataLink File. Since AccLink.udl is a text file, it may be opened with a text editor and this is what the file contains:
[oledb]
; Everything after this line is an OLE DB initstring
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:Documents and Settingscomputer userMy DocumentsNorthwind.mdb;Persist Security Info=False
Creating an ODBC Data Source Name
An ODBC Data source is easily created on Windows OS machines using the utility that comes with the operating system, with all the drivers installed on the machine. On a Windows XP machine this utility may be accessed by following the path Start--> All Programs-->Control Panel which opens the control panel. Once in the control panel, click on the Administrative Tools icon and from the window that pops up click on the Data Sources (ODBC) icon. This will bring up the ODBC Data Source Administrator window that manages and configures open database connectivity with data sources. Using this window one can create File, System and Machine Data Source Names (DSN), the name that can be used as a reference point for the data sources. If the file already exists it can be used as is, or it can be modified using the Configure... button which will open up windows where it can be modified.

Next: Creating a New ODBC DSN >>
More Database Articles
More By Jayaram Krishnaswamy