This code is redundant:
> Set RS = Server.CreateObject("ADODB.RecordSet")
> Set RS = oConn.execute(SQLquery)
The first line creates a dynamic recordset and the second line just overwrites it. You can remove the first line. Be aware that the execute method of the connection object will return a forward only recordset.
Try to run the query in the foxpro command window first, like this:
oConn = CreateObject("ADODB.Connection")
?oConn.Open("DSN=DATA;Uid=IUSR;")
SQLquery = "SELECT * FROM CUSTOMER"
RS = oConn.execute(SQLquery)
My guess is that you do not have the DSN setup correctly. Are you using a DBC or free tables?
You can check out my VFP ADO page to get more information
http://www.southbeachsoftware.com/artfoxasp.asp-Dave
>Hello all
>
>I am trying to connect to a VFP database using asp to get some data out of it to insert into my SQL server.
>
>Here is the Code:
>
>
> Set oConn = Server.CreateObject("ADODB.Connection")
> oConn.Open "DSN=DATA;" & _
> "Uid=IUSR;"
>
>
> SQLquery = "SELECT * FROM CUSTOMER"
> Set RS = Server.CreateObject("ADODB.RecordSet")
> Set RS = oConn.execute(SQLquery)
>
>Here is the result:
>
>
>Microsoft OLE DB Provider for ODBC Drivers (0x80040E37)
>[Microsoft][ODBC Visual FoxPro Driver]File 'customer.dbf' does not exist.
>
>I know for a fact that the file exsists and that the proper permissions are assigned
>
>The reason for the asp is that this process needs to automated i need to able to automaticaly get the data from one database into another with out any user interaction and i also need in prevent duplicate data from being inserted into the datase.
>
>Can anyone tell me what I an doing wrong, or possible provide another solution.