Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

convert from access

Status
Not open for further replies.

csvideo

Programmer
Oct 19, 2001
74
BB
whats the easiest way to convert a access database to vfp tables?


TIA
 
The export feature isn't very good. If the column width is undefined it'll make every column 255 wide. The best method I've found is using ODBC.

**targetfile="c:\data\northwind.mdb"
**targettable="employees"

close all
lnConnHandle = SQLSTRINGCONNECT('DRIVER=MICROSOFT ACCESS DRIVER; (*.MDB);DBQ='+"c:\data\northwind.mdb")
lnResult = SQLTABLES(lnConnHandle, 'TABLE')
SQLEXEC(lnConnHandle, 'SELECT * FROM "employees"', 'MyCursor')

sqldisconnect(lnConnHandle)
 
If you have, the right version of Access available, you could use Automation to read the tables directly. There is a utility written by a (now) MS employee that will pull all the data out and put it into tables in a DBC.
It's available on the UT ( in the Downloads area - look for MDB2DBC - Access to VFP Data Migrator by John Koziol.

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top