CreateRelation Method Example (VC++)

This example creates a new Relation object between the Employees and Departments tables. It then adds a field to the Relation object, and then generates a report describing properties governing the relation.

By setting the dbRelationUpdateCascade attribute, the Microsoft Jet database engine changes the foreign table if a corresponding value changes in the Primary table.

See How to Build the DAO Method Samples.

If you have installed the DAO SDK, see InstallDirectory\DAOSDK\SAMPLES\CreateRelation.cpp.