IsValidKeyDatatype Method

SQLServer.Database Object

Description

Indicates if the proposed key datatype is valid for use as a key column, and if it is compatible with the proposed reference datatype.

Visual Basic

bValid = Database.IsValidKeyDatatype (
[KeyColType :=] idKeyDatatype,
[[ReferencingColType :=] idReferenceDatatype] )

C++

HRESULT pDatabase->IsValidKeyDatatype (
SQLOLE_LPCSTR
idKeyDatatype,
LPBOOL
pbValid,
SQLOLE_LPCSTR
idReferenceDatatype = NULL );

Elements

Element Type Description

bValid Boolean Returned value indicates if the key datatype is valid and compatible with the reference datatype. If True, the key datatype is valid and compatible with the reference datatype. If False, the key datatype is either not valid or not compatible with the reference datatype.
idKeyDatatype Identifier Name of the key datatype
idReferenceDatatype Identifier Name of the reference datatype