?
Solved

How to connect ODBC to FoxPro 2.6 DBF Files

Posted on 2005-03-18
7
Medium Priority
?
1,420 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
7 Comments
 
LVL 12

Expert Comment

by:AshleyBryant
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:AshleyBryant
ID: 13577291
But if you're set on ODBC...

Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;Dbq="& Server.MapPath("bbank.dbf") &";
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 12

Expert Comment

by:AshleyBryant
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

762 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