foxpro to access?
i want to convert foxpro tables to access tables. is it possible from vb with ado?
- 1 decade agoFavorite Answer
just use the proper foxpro driver in your connection string.
Create a blank access database (or use an existing one).
create a connection object to foxpro
create a connection object to the blank access database
Load the recordset object with a select from the table you
want to copy in foxpro.
If the table already exists, then loop through the recordset creating insert statements for each row.
If the table doesn't exist, loop through the recordset's fields collection to get the column definitons and execute a create table
then loop through the recordset creating insert statements for each row.
This has the added advantage of being able to perform any transformations on the data before inserting it.
I do believe you can just import a table into access directly - bypassing the need to use vb at all.
Create a new database.
select file-> get external data ->import
Select the database file type.
if the foxpro type isn't listed,
select the odbc file type and
create a dsn to the foxpro database, or use an existing one
select your tables, and viola.
- 1 decade ago
why not export the data as a csv file, then you can simply import this into access or set up a script or stored procedure to do it for you.
- 1 decade ago
i dont think you can convert .dbf extensions to access tables
well perhaps i'm wrong