Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problems with ADODB connections and PromptEdit()
Message
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Problems with ADODB connections and PromptEdit()
Versions des environnements
Environment:
VB.NET 1.1
OS:
Windows XP SP1
Database:
MS SQL Server
Divers
Thread ID:
01073317
Message ID:
01073317
Vues:
61
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.
Répondre
Fil
Voir

Click here to load this message in the networking platform