Adding a Database

If you have an existing database that you have created in Visual FoxPro, you can add it and all its tables and views to the VPM Enterprise Data Builder.

Ø To add an existing database to the Data Builder

1.   If the database you want to add is outside the project’s path (which is normally the case), copy or move the database file and all of its tables to the project’s \Data directory. Use Windows Explorer.

2.   Select, or highlight, the Databases node in the treeview and click Add on the Databases page. VPME displays the Open dialog.

    

     Locate the database file to add and click the Add button.

3.   The Open dialog displays the databases in your project’s \DATA directory. Highlight the database you want to add. Click Add.

4.   VPM Enterprise imports the database, its tables, views and table/view fields are also imported into the Data Builder. After a few seconds, the database name will appear in the Databases list in the Data Builder, and the database’s tables and views will appear in the treeview list under the database name.

With the database name expanded, you can now create tables and views for the database by selecting the Tables, Local Views or Remote Views nodes under the database name and clicking the New button on the Data Builder.

Data Imported from the DBC to the Data Builder

Imported: When you add a database to the Data Builder, the Data Builder imports the database’s table structures, views, table indexes, table primary key designations and all field properties.

Not Imported: The Data Builder does not import items that are handled differently in VPM Enterprise. These items include table and view properties, referential integrity setup, table and view relations and table and view candidate key designations. Unless you plan on using the database outside your VPM Enterprise application, there is no need to set up table and view properties, referential integrity and candidate keys in the Visual FoxPro Database Designer. VPM Enterprise handles all these items in different (and we think better) ways through the Data Builder.

Tip: Although table and view relations are not imported, you may benefit from setting them in the Database Designer. When you set up the Data Environment in the Form or Report Designers, tables and views will be related if you have set the relations in the Database Designer.

More:

Removing a Database