Thanks,
Sandy
This will add references to MSDASC and OLEDBError. Then use the following
code to obtain a valid OLE DB connection string:
Dim oOLE As New MSDASC.DataLinks
Dim oConn As ADODB.Connection
oConn = oOLE.PromptNew()
MessageBox.Show(oConn.ConnectionString)
The promptNew method returns an ADO connection object, from which you can
read the ConnectionString property. Be sure to destroy the ADO connection
object when you're done with it.
There's also a PromptEdit() method that accepts an ADODB connection object
as a parameter, and will display the data link dialog set to the connection
information it finds on that connection object.
Hope this helps!
Steven Bras, MCSD
Microsoft Developer Support/Data Access Technologies
This posting is provided "AS IS" with no warranties, and confers no rights.
Microsoft Security Announcement: Have you installed the patch for Microsoft
Security Bulletin MS03-026? If not Microsoft strongly advises you to
review the information at the following link regarding Microsoft Security
Bulletin MS03-026
http://www.microsoft.com/security/security_bulletins/ms03-026.asp and/or to
visit Windows Update at http://windowsupdate.microsoft.com to install the
patch. Running the SCAN program from the Windows Update site will help to
insure you are current with all security patches, not just MS03-026.