Navigation:  DAO Object Classes > DaoDatabase Class >

DaoDatabase:CreateRelation() Method

Previous pageReturn to chapter overviewNext page

Purpose

Creates a new Relation object

 

Parameters

cName(Optional) A string that uniquely names the new Relation object.
cTable(Optional) A string that names the primary table in the relation. If the table doesn't exist before you append the Relation object, a run-time error occurs.
cForeign(Optional) A string that names the foreign table in the relation. If the table doesn't exist before you append the Relation object, a run-time error occurs
liAtttributes(Optional)A constant or combination of constants that contains information about the relationship type.

 

Returns

Object of type DaoQueryDef or NULL_OBJECT when an error is encountered

 

Remarks

The liAttributes value can be a combination of these constants

 

ConstantDescription

 

dbRelationUniqueThe relationship is one-to-one.
dbRelationDontEnforceThe relationship isn't enforced (no referential integrity).
dbRelationInheritedThe relationship exists in a non-current database that contains the two linked tables.
dbRelationUpdateCascadeUpdates will cascade.
dbRelationDeleteCascadeDeletions will cascade

 

 

Class

DaoDatabase        

 

Example

Database sample