Key Object (ADOX)

Microsoft ActiveX Data Objects (ADO)

ADOX 2.5 API Reference

Key Object

Represents a primary, foreign, or unique key field from a database table.




Remarks

The following code creates a new Key:

Dim obj As New Key

With the properties and collections of a Key object, you can:

  • Identify the key with the Name property.
  • Determine whether the key is primary, foreign, or unique with the Type property.
  • Access the database columns of the key with the Columns collection.
  • Specify the name of the related table with the RelatedTable property.
  • Determine the action performed on deletion or update of a primary key with the DeleteRule and UpdateRule properties.

See Also

Keys Append Method, Key Type, RelatedColumn, RelatedTable and UpdateRule Properties Example (VB)

Properties, Methods, and Events | Columns Collection | Keys Collection

© 1998-2003 Microsoft Corporation. All rights reserved.