|
-
Sep 7th, 2006, 05:25 PM
#1
Thread Starter
PowerPoster
Foxpro 2.0?
I'm going to be getting databases that are generated as Foxpro (maybe version 2.0? That's what the .inf files say.) Using the connection string at ConnectionStrings.com, I get an "Index file not found" error. (Access 2003 gives me the same error.) The CDX files for the dbf files are in the same directory as the dbf files.
If I load the dbf files into Foxpro and export them as dBase 4 files, I can access them as dbf files with no problem. It looks as if I need a connection string for Foxpro 2.0. Does anyone have one? Or a solution, if that's not my problem, that will allow me to open the files in VB6? (Converting every file to dBase 4 isn't viable.)
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
-
Sep 8th, 2006, 08:02 AM
#2
Re: Foxpro 2.0?
I couldn't find anything noticably different at any of my sources I'm afraid (even at MSDN).. but I did find this snippet which may be useful:
 Originally Posted by [url=http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odbcjetdbase_programming_considerations.asp]MSDN[/url]
Note Accessing dBASE ISAM files through the ODBC Desktop Database Drivers requires installation of the Borland database engine.
edit: are you including the file name in the connection string? it seems that you should just enter the path, and use the file names as tables in your SQL statements.
Last edited by si_the_geek; Sep 8th, 2006 at 08:08 AM.
-
Sep 8th, 2006, 09:14 AM
#3
Thread Starter
PowerPoster
Re: Foxpro 2.0?
[QUOTE=si_the_geek]but I did find this snippet which may be useful:
 Originally Posted by MSDN
Note Accessing dBASE ISAM files through the ODBC Desktop Database Drivers requires installation of the Borland database engine.
I'll try that. Strange, though, that I can access dBase .dbf files but not Foxpro .dbf files.
edit: are you including the file name in the connection string? it seems that you should just enter the path, and use the file names as tables in your SQL statements.
Yes, of course. It's not the data files that can't be found, it's the index files. IIRC, dBase index files were .idx, not .cdx. If the format's the same, maybe that's the problem.
I have "DriverID=277" as part of the connection string - I suspect that some other number would tell Jet to handle Foxpro 2.0. I just don't know what ID that would be. If all else fails, I guess I'll just have to convert every one of them to dBase IV.
Thanks, Si.
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
-
Sep 8th, 2006, 09:56 AM
#4
Thread Starter
PowerPoster
Re: Foxpro 2.0?
I did a little more digging and found a way to do this. I'll post it in case anyone ever needs to access a Foxpro 2.0 .dbf file. I had to create a Visual Foxpro machine DSN to the directory (I called it CARR) pointing to the mapped drive the Foxpro .dbf files are in. Then:
VB Code:
conn.ConnectionString = "Provider=MSDASQL.1;Persist Security Info=False;Data Source=CARR"
It's used the same as any other Foxpro connection - the table name in the SQL statement is the name of the file.
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
-
Sep 10th, 2006, 05:17 AM
#5
Hyperactive Member
Re: Foxpro 2.0?
Better to delete the .cdx from the directory and use foxpro database file from foxpro command prompt and it will ask for index ..remove it and try to connect
I think it will help
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|