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.Connection")

      conn.Open "DSN=bbank_legacy"
      Set RS=Server.CreateObject("ADODB.Recordset")
      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!
electricd7Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ashley BryantSenior Software EngineerCommented:
Use OLE DB

Provider=Microsoft.Jet.OLEDB.4.0;Data Source="& Server.MapPath("bbank.dbf") &";Extended Properties=dBASE IV;User ID=Admin;Password=
0
electricd7Author Commented:
Actually I just solved it myself by using "DBQ=C:\TEMP;Driver={Microsoft dBase Driver (*.dbf)};  DriverId=277;FIL=dBase4.0 " Thanks anyway!

ED7
0
Ashley BryantSenior Software EngineerCommented:
But if you're set on ODBC...

Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;Dbq="& Server.MapPath("bbank.dbf") &";
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Ashley BryantSenior Software EngineerCommented:
Ahh...didn't see your post when I replied again.  Good man (or woman.  I dunno, hehe) fixing it on your own.
0
electricd7Author Commented:
hehe Thanks!
0
moduloCommented:
Closed, 500 points refunded.

modulo
Community Support Moderator
Experts Exchange
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.