다음을 통해 공유


Type Property (Key)

Microsoft SQL Server의 이후 버전에서는 이 기능이 제거됩니다. 새 개발 작업에서는 이 기능을 사용하지 않도록 하고, 현재 이 기능을 사용하는 응용 프로그램은 수정하십시오.

The Type property exposes configured attributes of the referenced Microsoft SQL Server component.

구문

object.Type [= value]

Parts

  • object
    An expression that evaluates to an object in the Applies To list.

  • value
    A long integer that specifies key constraint attributes as described in Settings.

Data Type

Long, enumerated

Modifiable

Read/write when using the Key object to define a PRIMARY KEY or FOREIGN KEY constraint. Read-only when the Key object references an existing constraint.

Prototype (C/C++)

HRESULT GetType(SQLDMO_KEY_TYPE* pRetVal)
HRESULT SetType(SQLDMO_KEY_TYPE NewValue)

Settings

Constant

Value

Description

SQLDMOKey_Foreign

3

The key references, or will be used to create, a SQL Server FOREIGN KEY constraint.

SQLDMOKey_Primary

1

The key references, or will be used to create, a SQL Server PRIMARY KEY constraint.

SQLDMOKey_Unique

2

The key references a SQL Server UNIQUE constraint on a column not allowing NULL.

SQLDMOKey_Unknown

0

The value is not valid.

Applies To: