Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to set my connection string?
Message
De
16/01/2001 14:49:48
 
 
À
16/01/2001 11:38:45
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Divers
Thread ID:
00464236
Message ID:
00464345
Vues:
20
>I use ADO and I want to access database by ODBC.
>I tried the following (to access SQL Server database)
> Dim cn As New ADODB.Connection
> Const lcConnectString = "uid=pomuser;pwd=pompom;driver=SQL Server;" & _
> "server=SQL_Server;database=pom;dsn=''"
> loConnection.ConnectionString = lcConnectString
> loConnection.Open
> EVERYTHING WORKS FINE!
>
>but also I want to access a Visual FoxPro database,
>so how do I set my connection string when
> driver name = Microsoft Visual FoxPro Driver
> database name = Campagne
> dsn has been created in ODBC named 'VFP Campagne'
> uid is null
> pwd is null
>The driver is recognized but I got a run time error:
>[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
>
>Someone can help me please?
>Thank you in advance.

You would use an ODBC string or DSN name. See the following KB article for an example: http://support.microsoft.com/support/kb/ARTICLES/Q191/4/13.asp
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform