Skip to content

Latest commit

 

History

History
48 lines (37 loc) · 1.95 KB

File metadata and controls

48 lines (37 loc) · 1.95 KB
title Key Object (ADOX) | Microsoft Docs
ms.prod sql
ms.prod_service connectivity
ms.technology connectivity
ms.custom
ms.date 01/19/2017
ms.reviewer
ms.topic conceptual
apitype COM
f1_keywords
Key
helpviewer_keywords
Key object [ADOX]
ms.assetid 55f116fe-4d56-4892-bffe-0cdd6fc727c9
author MightyPen
ms.author genemi

Key Object (ADOX)

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.

This section contains the following topic.

See Also

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