Visual FoxPro 6.0

S

SBA

Can anyone tell me how to link an Access 2003 Table to a Visual FoxPro 6.0
database?
 
J

Jeanette Cunningham

SBA,
I haven't done this myself, but here are the notes from microsoft online
help.

Import or link data from other ODBC data sources

Note You can only import or link an SQL or other ODBC data source if you
have installed the appropriate driver.

Open an Access file, or switch to the Database window for the open Access
file.
Do one of the following:
To import tables, on the File menu, point to Get External Data, and then
click Import.
To link tables, on the File menu, point to Get External Data, and then click
Link Tables.


In the Import (or Link) dialog box, in the Files of type box, select ODBC
Databases().
The Select Data Source dialog box lists the defined data sources for any
ODBC drivers that are installed on your computer.

Click either the File Data Source or Machine Data Source tab, and then
double-click the ODBC data source that you want to import.

To define a new data source for any installed ODBC driver, click New, and
then follow the instructions in the Create New Data Source dialog box and
the dialog boxes that follow it before continuing.

If the ODBC data source that you selected requires you to log on, type your
logon ID and password (additional information might also be required), and
then click OK.
Microsoft Access connects to the ODBC data source and displays the list of
tables that you can import or link.

If you're linking a table, do not select the Save password check box if you
want to keep the database secure. This will force users to type the logon ID
and password every time they open the table in each new session with
Microsoft Access. Your SQL database administrator can also choose to disable
this check box, requiring all users to type the logon ID and password each
time they connect to the SQL database.
Click each table that you want to import or link, and then click OK. If
you're linking a table and it doesn't have an index that uniquely identifies
each record, then Microsoft Access displays a list of the fields in the
linked table. Click a field or a combination of fields that will uniquely
identify each record, and then click OK.

Jeanette Cunningham
 
A

Albert D. Kallal

here is another post:

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/vfoxpro/downloads/updates/odbc/default.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 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.
 

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