No big deal
OPEN DATABASE x
lnConn=SQLCONNECT() && get an ODBC connection to the MDB
SQLTABLES(lnConn, 'TABLE', 'mdbtables')
SCAN
TEXT TO lcSQL TEXTMERGE NOSHOW
SELECT * FROM "<<table_name>>"
ENDTEXT
lcTable = CHRTRAN(mdbtables.table_name,' ','_')
SQLEXEC(lnConn, lcSQL, 'sqlresult')
COPY TO (lcTABLE) DATABASE x
ENDSCAN
That is roughly what it takes to create a VFP copy of an entire MDB
programmatically.
You may run into some problems with table names with characters that VFP
doesn't support in table names. Add them to the CHRTRAN list.
And add a path to your data folder.
You may also run into the Access programming habit of setting text columns
like Lastname to 255 characters which is one too many for a Character field
in VFP, resulting in a Memo field.
You can corret that afterwards.
SQLTABLES can also get the VIEW names in the MDB.
-Anders
Post by CraigI would like some suggestions on how to convert an MDB into a DBC. Is there a
simple method to do this, or is it necessary to do it by hand?
Thanks
Craig