Microsoft KB Archive/195913

= How To Generate ODBC & OLEDB Connection Strings with Data Links =

Article ID: 195913

Article Last Modified on 3/14/2005

-

APPLIES TO


 * Microsoft Data Access Components 2.0
 * Microsoft Data Access Components 2.1 Service Pack 2
 * Microsoft Data Access Components 2.5
 * Microsoft Data Access Components 2.8

-



This article was previously published under Q195913



SUMMARY
Microsoft Data Links, provided with the Microsoft Data Access Components 2.0, provide a convenient and standard way to create and validate the connection string syntax used with an ODBC Driver or OLE DB Provider. Even if you do not reference the data link in your application, when you use Data Links to create your connection string, it validates the connection string syntax to be used with your ODBC Driver or OLE DB Provider.



MORE INFORMATION
Data Links are available after installing Visual Basic 6.0, Data Access SDK 2.x, or MDAC 2.0 or 2.1 Run-time Components. MDAC 2.5 is included with Windows 2000 but the Microsoft Data Links option is not available by default.. You can access Data Links from the Visual Basic 6.0 Data Environment, or from the Microsoft Windows 95, 98 or NT 4.0 shell, as outlined in the following steps:

Steps to Build a Connection String

 * 1) Install Visual Basic 6.0, the Data Access 2.x SDK, or MDAC 2.0x Run-time Components.
 * 2) Right-click on the Windows desktop, point to New, and select Microsoft Data Link to create a Microsoft Data Link shortcut on your desktop (New Microsoft Data Link.udl).
 * 3) Right-click the New Microsoft Data Link and click Properties to open the Data Link Properties dialog box. To create a connection to a datasource, use the CONNECTION tab.

NOTE: You can optionally use the ADVANCED and ALL tabs to set specific behavior available to either an ODBC or OLE DB data source.
 * 1) Once you have completed and tested your connection, click OK to save your new data link.
 * 2) Open your New Microsoft Data Link.udl file with Notepad (or other text editor). From the .udl file, you can copy the connection string and use it in your application that connects to an MDAC technology.

Steps to Enable New\Microsoft Data Link from the Windows 2000 Desktop
For additional information on how to enable this functionality in Windows 2000, click the article number below to view the article in the Microsoft Knowledge Base:

244659 MDAC 2.5 Sample How to Create a Data Link File with Windows 2000

