You should be aware that the VPME Data Builder and the VPME classes replace Visual FoxPro functionality in the following two areas:
· Entity Integrity: Entity integrity means that primary keys cannot be null or duplicated. Visual FoxPro allows you to designate a primary key in the Table Designer. If you do, Visual FoxPro will prevent duplicate primary keys for tables in DBC’s. However, you don’t need to do that.
VPM Enterprise provides full entity integrity for tables and local views. All you have to do is identify an index tag as the primary key on the tag’s edit page in the Data Builder. The VPM Enterprise entity integrity works for all tables and local views in your application — even free tables.
Important Tip: If you do create a primary key type in the Table Designer, enter a index filter expression of “NOT DELETED()” to prevent Visual FoxPro from including deleted records in its duplicate primary key check. You must also create a second regular index tag with the same primary key expression but no filter.
Tip – Entity Integrity for Remote Views and CursorAdapters: By default, VPME does not enforce entity integrity for remote views and CursorAdapters. VPME relies on the data engine of the remote database to handle entity integrity after a transaction is submitted, which is normally what you want. However, if you need to do so, you can set up VPME to enforce entity integrity for remote views and CursorAdapters using candidate keys. See Candidate Keys – Preventing Duplicate Values.
· Referential Integrity: You can set up referential integrity among database tables and views in the Database Designer using the Visual FoxPro Referential Integrity Builder. However, you don’t need to do that.
VPM Enterprise provides referential integrity functionality that is much more extensive than that provided by Visual FoxPro. VPM Enterprise referential integrity handles compound primary and foreign keys and provides referential integrity for free tables. You can even use VPME's referential integrity functionality on remote data and CursorAdapters.