Can't use ODBC-link from Access 2007 to Visual Fox pro (.dbf)

A

Ankan

I´ve used (for many years) Access 2007 to "look" into a Visual Fox Pro
table via a ODBC-link. Now the Fox Tables are "updated" ("both
structure and data are changed and the files are prepared for SQL-use
inte future") and I'm not able to establish the link. I can still see
the Fox Tables that are not changed but not the new ones. Thanks for
ANY help! /Anders
 
A

Ankan

I´ve used (for many years) Access 2007 to "look" into a Visual Fox Pro
table via a ODBC-link. Now the Fox Tables are "updated" ("both
structure and data are changed and the files are prepared for SQL-use
inte future") and I'm not able to establish the link. I can still see
the Fox Tables that are not changed but not the new ones. Thanks for
ANY help!  /Anders

I solved the problem by following this advice "The new VFP ODBC Driver
released as part of the Advantage Database Server Version 9.0 (Beta)
is fully compatible with VFP 9.0 Data." Case Closed :) /anders
 
A

Albert D. Kallal

I would ensure that the file is a directory that has 8 or less characters,
and also no spaces (that directory becomes the database name, and in side
the file names become table names).

so for starters, keep the directory and file length names <= 8 chars in
length, and I would also advoid spaces in any direcltory or file name.

It not clear if your FoxPro data was upgraded to a "later" edition of
FoxPro?

here is a re-post in this group that might help you:


Originally posted by Cindy Winegarden Microsoft Visual FoxPro MVP:

Start with the latest ODBC driver for FoxPro and Visual FoxPro, available
from
http://msdn.microsoft.com/vfoxpro/downloads/addons/odbc.asp. Download and
install it.

(the above seems wrong now..try the following <nb: Albert K.>

http://msdn.microsoft.com/en-us/vfoxpro/bb190233.aspx

You will need to determine whether you have FoxPro "free" tables or a
"database container" (contains metadata about the tables themselves).

To do this, navigate to your data directory and look for the presence of a
DBC
file. If its there you have a "database" otherwise you have free tables.

Now open up the ODBC dialog. In WinXP its Start | Administrative Tools |
Data Sources (ODBC). Choose either the User DSN or the System DSN. (The
difference lies in whether you want other people to be able to see it if
they use your machine.)

Click Add... Scroll down to the Microsoft Visual FoxPro Driver. Scroll over
to verify that its version 6.01.8629.01. Click Finish.

Now youre at the ODBC Visual FoxPr Setup dialog. In the first box (Data
Source Name) enter a friendly name that you will use to recognise this data
source - My FoxPro Data Source. You can add more text in the description
box.

Below are two options. Choose Visual FoxPro database (.DBC) or Free Table
Directory - whichever you have determined is correct.

Browse to locate your directory, or your specific DBC file.

You can click the Options button for more choices.
The defaults should be
ok. "Exclusive" refers to whether you want to have exclusive access to the
data while youre using it. "Null" allows you to enter Null values or not.
Older FoxPro tables do not allow Nulls. "Deleted" means to hide deleted
records. This ones important if you are working with primary keys - more in
a minute. "Fetch data in background" will allow you to see the first few
lines of a large tablel while the rest is being retrieved. You can also
indicate a collating sequence if youre using a non-English alphabet.

Click OK and youre done.

Now, about deleted records. When a record is deleted in a FoxPro or Visual
FoxPro table its merely marked as deleted and filtered out, but is still
physically present in the table. If you have a unique index and you delete
the record with a key value of 123 you can not enter another record with
this value, even though you cant see the record. To get rid of records
entirely, you must issue a PACK command. However, the best rule to follow is
to not reuse primary keys.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top