Edit Foxpro Tables?

  • Thread starter Microsoft Newsgroup
  • Start date
M

Microsoft Newsgroup

I would like to edit Foxpro tables using Access 2002. I have copied certain
data tables to my hard drive (not read-only/locked), set up a Foxpro ODBC
driver and can view the data, but cannot edit it.

Does anyone have any suggestions for editing these tables? Any help is
welcome. Thanks.

Gary
(e-mail address removed)
 
A

Albert D. Kallal

I cam accross this..it might help:

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.


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 it's there you have a "database" otherwise you have free tables.

Now open up the ODBC dialog. In WinXP it's 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 it's version 6.01.8629.01. Click Finish.

Now you're 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 you're 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 one's 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 you're using a non-English alphabet.

Click OK and you're done.

Now, about deleted records. When a record is deleted in a FoxPro or Visual
FoxPro table it's 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 can't 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.
 
M

Microsoft Newsgroup

Thanks for the timely response.

I am running Windows 2000 and have installed MDAC 2.7 so I don't think that
I need to update the ODBC Driver (MS Visual FoxPro Driver version
6.01.8630.01).

In order to eliminate any lock variables, I've copied to my C: drive the
folder (AR) that contains the Foxpro FREE tables for our business
application. I created the ODBC driver (as instructed below) and linked the
ARCUST01 (customer master record) table in Access 2002.

I am still not able to modify table data, however. I created a DELETE query
and tried to delete one record and received the following error:

"Could not delete from specified tables"

I am also unable to modify any data in this table.

This may be a clue ... When I try to view the properties of the ARCUST01
table, I get the following error:

"Table ARCUST01 is a linked table with properties that cannot be modified"

Any further suggestions?

Again, thanks for your help, Albert.

Gary
 
C

Cindy Winegarden

In Microsoft Newsgroup <[email protected]> posted:

Hi Gary,
I am running Windows 2000 and have installed MDAC 2.7 so I don't
think that I need to update the ODBC Driver (MS Visual FoxPro Driver
version
6.01.8630.01).

That's odd - as far as I know the latest (and last) VFP ODBC driver is
version 6.1.8629.1, downloadable from
http://msdn.microsoft.com/vfoxpro/downloads/updates/default.aspx. The last
version of MDAC that it was included with was MDAC 2.5.
In order to eliminate any lock variables, I've copied to my C: drive
the folder (AR) that contains the Foxpro FREE tables for our business
application. I created the ODBC driver (as instructed below) and
linked the ARCUST01 (customer master record) table in Access 2002.

I am still not able to modify table data, however. I created a DELETE
query and tried to delete one record and received the following error:
"Could not delete from specified tables"

I am also unable to modify any data in this table.

This may be a clue ... When I try to view the properties of the
ARCUST01 table, I get the following error:

"Table ARCUST01 is a linked table with properties that cannot be
modified"

This is a typical Access message for linked tables. Do you have the "Do you
want to open it anyway?" message? You should be able to view the table
structure.

Are there other tables? Can you access them? Can you create a DBF in Excel
and then link to and change values it in Access?
 

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