Hello folks,

The following code creates a 1:n relation with referential integrity with the ADOX:

VB Code:
  1. With objKey
  2.         .Name = "users/patients"
  3.         .Type = adKeyForeign
  4.         .RelatedTable = "users"
  5.         .Columns.Append "user_id"
  6.         .Columns("user_id").RelatedColumn = "user_id"
  7.         .DeleteRule = adRICascade
  8.         .UpdateRule = adRINone
  9.     End With
  10.     Cat.Tables("patients").Keys.Append objKey

where the "objKey" is ADOX.Key object and the "cat" is the ADOX.Catalog object.

What I want to know is, how should I code if I want to have:

1) a relation without referential integrity (easy to do manually in MS Access: means not to check ref. integrity checkbox on the dialog when creating a new relation),
2) a 1:1 relation (in MS Access means drop a field into same named field in other table and they are both primary keys),
3) a relation with a different join type (in MS Access means change the join type under 'edit relationships')

Can anybody help me? Any code snippet, link, etc. is highly appreciated and welcome!
Thank you for anwers in advance!

Best regards,
Bela