TransferDatabase

D

Dale

Hi all,

Can anyone give me some examples (or point me to a good source of
information) on how to import a dbase/foxpro table into an access database?
At this point I have a completely blank access database.

Regards
Dale
 
K

Klatuu

First, create Access tables with the structure (field names and data types)
to match the files you want to import. Then link to your dbase/foxrpo files.
It will recognize Dbase III, Dbase IV, and Dbase 5 file structures. Create
append queries in Access to copy the data from the linked tables to the
Access tables. Then delete the links to the dbase files.
 
D

Dale

Thanx for the reply. Problem tho.

I will not know the data structure ahead of time. I'd like to do this
programatically via automation. Problem is, I know just enough to be
dangerous. I'm hoping that knowledge is half the battle.

Sorry I wan't more up front to begin with.

Dale
 
K

Klatuu

Interesting you will not know the structure. This is not a big issue. Link
the dbase files. Then you can select the file, Right Click, select copy,
deselect the file, right click, select paste. You will get a dialog of
choices. You could just copy structure and data, or if you will be importing
more than once, copy only the structure, and do the import as I previously
suggested.
 
J

John Nurick

I see from a later post that you want to do this under program control
for tables of arbitrary structure. Depending on what version of dBase/FP
you are faced with, you may be able to use the Jet xBase ISAM by writing
code that builds and executes SQL make-table queries using this syntax
to access the dBase files:

SELECT * INTO NewTable FROM DBTABLE IN "C:\DBASE\IMPORT" "dBASE IV;"

In that example, the dBase table is DBTABLE.DBF and "C:\DBASE\IMPORT" is
the name of the folder it's in (along with any associated index and memo
files). All these must be old-style short names (or the short
equivalents of modern long names).

With recent versions of xBase I'm not quite sure what the procedure
would be, but I presume one needs to use an ODBC driver and write code
to build appropriate connection strings.
 

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