Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OLE DB Connection string and ADO object commands
Message
De
22/03/2006 10:27:19
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Web Services
Titre:
OLE DB Connection string and ADO object commands
Divers
Thread ID:
01106640
Message ID:
01106640
Vues:
61
I'm having all kinds of trouble figuring out how to install and find a basic ASP script to talk to VFP data from ASP.

here is my ASP code I'm trying to use:

lcSelectClause = "SELECT Dname from dealer"
CrownDBC_ConnectionString = "Provider=VFPOLEDB.1;Data Source=i:\crown01\crownweb.dbc"
CrownDBC_ConnectionTimeout = 15
CrownDBC_CommandTimeout = 30
CrownDBC_CursorLocation = 3
CrownDBC_RuntimeUserName = ""
CrownDBC_RuntimePassword = ""
Set MyConn = Server.CreateObject("ADODB.Connection")
MyConn.ConnectionTimeout = CrownDBC_ConnectionTimeout
MyConn.CommandTimeout = CrownDBC_CommandTimeout
MyConn.Open CrownDBC_ConnectionString, CrownDBC_RuntimeUserName, CrownDBC_RuntimePassword

Set cmdTemp = Server.CreateObject("ADODB.Command")
Set dataset = Server.CreateObject("ADODB.Recordset")
cmdTemp.CommandText = lcSelectClause
cmdTemp.CommandType = 1
Set cmdTemp.ActiveConnection = MyConn
dataset.Open cmdTemp, , 1, 3

I'm getting an error on the "Set CmTemp.ActiveConnection = MyConn". I assume this means that the vfpoledb provider is available or it would have errored on the MyConn.Open command.


I've used this ADO structure with ODBC for about five years now without any problems so it's kind of rough now going back in and trying to do it a new way.

Any help is MUCH appreciated!
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform