共用方式為


BindToDatatype Method

未來的 Microsoft SQL Server 發行版本將不再提供此功能。請避免在新的開發工作中使用此功能,並計劃修改目前使用此功能的應用程式。

The BindToDatatype method enables a default or rule on the user-defined data type specified.

語法

object
.BindToDatatype(
DatatypeName
, [ FutureOnly ] )

Parts

  • object
    Expression that evaluates to an object in the Applies To list.
  • DatatypeName
    String specifying an existing user-defined data type by name.
  • FutureOnly
    When TRUE, binding does not cause a check of columns existing and defined using the data type. When FALSE (default), existing values are checked for agreement with the rule.

Prototype (C/C++)

HRESULT BindToDatatype(
SQLDMO_LPCSTR DatatypeName,
BOOL bFutureOnly = FALSE);

Applies to:

Default Object

Rule Object