electricd7
asked on
How to connect ODBC to FoxPro 2.6 DBF Files
I have 2 DBF files from a FoxPro 2.6 database program. I have them in thier own directory and have created a system dns called "bbank_legacy" by using the Microsoft FoxPro VFP Driver. I changed the options to "Free Table Structure" and pointed it at the correct folder. I then wrote the following ASP Page:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Dim conn
Set conn = Server.CreateObject("ADODB .Connectio n")
conn.Open "DSN=bbank_legacy"
Set RS=Server.CreateObject("AD ODB.Record set")
RS.Open "Select * from BBANK", conn
While not RS.EOF
Response.write RS("unit_num")&"<BR>"
RS.Movenext
Wend
RS.Close
Set RS = Nothing
conn.Close
Set con = Nothing
%>
When I run this file, I get the following error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e37'
[Microsoft][ODBC Visual FoxPro Driver]File 'bbank.dbf' does not exist.
/testing/foxpro1.asp, line 9
Anyone ever worked with FoxPro 2.6 DBF files? I really need this, so 500pts!
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Dim conn
Set conn = Server.CreateObject("ADODB
conn.Open "DSN=bbank_legacy"
Set RS=Server.CreateObject("AD
RS.Open "Select * from BBANK", conn
While not RS.EOF
Response.write RS("unit_num")&"<BR>"
RS.Movenext
Wend
RS.Close
Set RS = Nothing
conn.Close
Set con = Nothing
%>
When I run this file, I get the following error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e37'
[Microsoft][ODBC Visual FoxPro Driver]File 'bbank.dbf' does not exist.
/testing/foxpro1.asp, line 9
Anyone ever worked with FoxPro 2.6 DBF files? I really need this, so 500pts!
ASKER
Actually I just solved it myself by using "DBQ=C:\TEMP;Driver={Micro soft dBase Driver (*.dbf)}; DriverId=277;FIL=dBase4.0 " Thanks anyway!
ED7
ED7
But if you're set on ODBC...
Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;Dbq= "& Server.MapPath("bbank.dbf" ) &";
Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;Dbq=
Ahh...didn't see your post when I replied again. Good man (or woman. I dunno, hehe) fixing it on your own.
ASKER
hehe Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Provider=Microsoft.Jet.OLE