Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OLE DB Connection string and ADO object commands
Message
From
22/03/2006 10:27:19
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Web Services
Title:
OLE DB Connection string and ADO object commands
Miscellaneous
Thread ID:
01106640
Message ID:
01106640
Views:
62
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!
Next
Reply
Map
View

Click here to load this message in the networking platform