Article ID: 283245 - Last Review: July 1, 2004 - Revision: 2.3 How To Persist Data Links Programmatically
This article was previously published under Q283245 SUMMARY
This article explains how to persist and use Microsoft Data Links programmatically with Microsoft Visual Basic and Microsoft Visual C++.
MORE INFORMATION
Data Links provide a convenient way to create and verify a connection string that can be used to connect to an OLE DB data source. The connection string information is persisted in a specific format in a Data Link file with the .udl extension. The functionality is similar to the Open Database Connectivity (ODBC) file Data Source Names (DSNs), but .udl files contain Unicode characters. The following is the content of a sample Data Link file. You can edit this file using a Unicode text editor such as Microsoft Notepad. [oledb] ; Everything after this line is an OLE DB initstring. Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=pubs;Data Source=myServer
REFERENCES
For more information, see "Using the Data Link API" at the following Microsoft Web site:
http://msdn.microsoft.com/en-us/library/aa224776(SQL.80).aspx
(http://msdn.microsoft.com/en-us/library/aa224776(SQL.80).aspx)
For additional information, click the article numbers below
to view the articles in the Microsoft Knowledge Base:
189680
(http://support.microsoft.com/kb/189680/EN-US/
)
How To Use Data Link Files with ADO
195913
(http://support.microsoft.com/kb/195913/EN-US/
)
How To Generate ODBC and OLEDB Connection Strings with Data Links
244659
(http://support.microsoft.com/kb/244659/EN-US/
)
SAMPLE: How to Create a Data Link File with Windows 2000
218600
(http://support.microsoft.com/kb/218600/EN-US/
)
How To Use Data Links to Create a Connection String at Run-Time
| Other Resources Other Support Sites
CommunityArticle Translations |






Windows Live
Facebook
Twitter
Linkedin
Digg it
Yahoo
Delicious
StumbleUpon
Yammer
Reddit
Technorati
FriendFeed
Email
Back to the top