Referencing a Connection String in Your Application

OLE DB Programmer's Reference

You can enable your end users to build, save, and access connection strings and .udl files within your own applications. You can invoke the Data Link user interface programmatically whenever you need the user to specify what data to access.

The information that is returned from the Data Link user interface can be used to create OLE DB data source objects. For more information about creating data source objects, see the OLE DB IDataInitialize interface.

For greater performance, you can enable .udl pooling by adding "Udl Pooling" to the registry key "SOFTWARE\Microsoft\DataAccess" under HKEY_LOCAL_MACHINE. A Cache Size value greater than 0 (Cache Size=1) will enable the feature. A value of 100 is recommended. The .udl pooling feature allows connection information to be cached using IDataInitialize::LoadStringFromStorage and then passed to IDataInitialize::GetDataSource.

Programmatically Accessing the Data Link User Interface

You can call the Data Link API from any application development tool, such as Microsoft Visual C++ , that supports the access of COM objects.

To access the Data Link API from applications that can directly access a COM interface, use the OLE DB IDBPromptInitialize interface.

See Also

Data Link API Overview | Connection String Syntax

1998-2001 Microsoft Corporation. All rights reserved.



Microsoft Ole Db 2.0 Programmer's Reference and Data Access SDK
Microsoft OLE DB 2.0 Programmers Reference and Data Access SDK (Microsoft Professional Editions)
ISBN: 0735605904
EAN: 2147483647
Year: 1998
Pages: 1083

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net