Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with ADODB connections and PromptEdit()
Message
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
Problems with ADODB connections and PromptEdit()
Environment versions
Environment:
VB.NET 1.1
OS:
Windows XP SP1
Database:
MS SQL Server
Miscellaneous
Thread ID:
01073317
Message ID:
01073317
Views:
60
To all,

I've spent the last three hours trying to make my app portable by adding access to the Data Link Properties dialog in MSDASC. I've lost count of the number of "articles" on how to do this apparently simple thing. None of them works out of the box, all of them are missing something fundamental.

I've finally gotten the bloody thing to work, but only with a couple of highly questionable hacks.

Does anyone have a class (or equivalent code) that will allow the developer to apply a filename ("myFile.udl") to a property, call the Data Link Properties dialog and then save the changes to the udl file?

FWIW, questionable hack (1) involves a cast of the ADODB.connection object into a generic object:

Dim dlEditConn AS MSDASC.DataLinks = New MSDASC.DataLinkds
Dim cnTmp AS ADODB.Connection = New ADODB.Connection
dlEditConn.PromptEdit(CType(cnTmp, Object))

Questionable hack (2) involves removing the string "Provider=SQLOLEDB.1" from the connection string that's created by the Data Link Properties dialog. Is this true across the board or is my box giving me fits, as usual?

TIA,
Thom C.
Reply
Map
View

Click here to load this message in the networking platform