First of all, the Visual FoxPro Database is a "container". You cannot convert a table (which is "contained in" into a container of something.
The second: if you want to convert the tables into "free tables" you dont' need a VFP database at all. The role of a VFP database is, primarily, to eliminate the free tables, including them in a container.
The third:
To convert FPW tables into a VFP database, you need to create the database. The easy way: create a project in that directory. Open it in Project Manager. Add the brand new database to it. Select the database in the treeview. Click on the + sign. Select 'Tables' in the treeview, then click 'Add'. And add the FPW tables. At first opening of a table, VFP will automatically and transparently convert the table to VFP format (internally, it will modify some bytes in the file header, but you don't need to know all this - it will be done automatically).
If you want it to be converted runtime you could think of a scheme where you create a data base container with empty tables, views, indexes etc.
Open your old tables and append the records to the new database container tables.
You should be aware of referential integrity, though.
To create database containers runtime check out the GenDBC.prg that comes with Visual studio.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.