Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How to connect ODBC to FoxPro 2.6 DBF Files

Posted on 2005-03-18
7
Medium Priority
?
1,555 Views
Last Modified: 2010-05-19
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!
0
Comment
Question by:electricd7
  • 3
  • 2
6 Comments
 
LVL 12

Expert Comment

by:Ashley Bryant
ID: 13577274
Use OLE DB

Provider=Microsoft.Jet.OLEDB.4.0;Data Source="& Server.MapPath("bbank.dbf") &";Extended Properties=dBASE IV;User ID=Admin;Password=
0
 

Author Comment

by:electricd7
ID: 13577289
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
 
LVL 12

Expert Comment

by:Ashley Bryant
ID: 13577291
But if you're set on ODBC...

Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;Dbq="& Server.MapPath("bbank.dbf") &";
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 12

Expert Comment

by:Ashley Bryant
ID: 13577307
Ahh...didn't see your post when I replied again.  Good man (or woman.  I dunno, hehe) fixing it on your own.
0
 

Author Comment

by:electricd7
ID: 13577311
hehe Thanks!
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 13616874
Closed, 500 points refunded.

modulo
Community Support Moderator
Experts Exchange
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…
Suggested Courses

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question