Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create Connection Problem (With OLEDB)
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Create Connection Problem (With OLEDB)
Divers
Thread ID:
00565686
Message ID:
00565686
Vues:
61
Using the VFP7 OLEDB provider, I am trying to create an ODBC connection on a database for pulling in a remote view. In the VFP IDE, I can do this in the command window and I can immediately see the connection in the list:
Create Connection ConnDummy01 ConnString "Driver={SQL Server};Server=sqlbeta;Database=lookup1;UID=uid;PWD=pwd"



But this does not work from VBScript:
Set oCacheConn = WScript.CreateObject("ADODB.Connection")
With oCacheConn
.ConnectionString = "Provider=VFPOLEDB.1;Data Source=c:\my.dbc"
.CursorLocation = 2 ' adUseServer
.Mode = 16 ' adModeShareDenyNone
.Open
End With
cExecString = "Create Connection ConnDummy01 ConnString " &Chr(34)& "Driver={SQL Server};Server=sqlbeta;Database=lookup1;UID=uid;PWD=pwd" & Chr(34)
WScript.Echo cExecString
oCacheConn.Execute(cExecString)
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform