BindDefault Method (SQL-DMO)

The BindDefault method implements Microsoft® SQL Server™ default binding and unbinding for columns and user-defined data types.

Applies To
Column Object UserDefinedDatatype Object

Syntax

object.BindDefault( DefaultOwner , DefaultName , Bind )

Part Description
object Expression that evaluates to an object in the Applies To list
DefaultOwner String identifying the database user owning the bound default
DefaultName String identifying the bound default by name
Bind True or False as described in Settings

Settings

When Bind is True, the default named is bound to the column or user-defined data type referenced.

When Bind is False, any default is unbound from the referenced column or user-defined data type. The DefaultOwner and DefaultName properties are ignored.

Remarks

The BindDefault method of the Column or UserDefinedDatatype object, and the BindToColumn and BindToDatatype methods of the Default object, associate a SQL Server default with a user-defined data type or column.

The BindDefault method does not cause a check of existing values when a new default is indicated for a column or user-defined data type.

Prototype (C/C++)

HRESULT BindDefault(SQLDMO_LPCSTR DefaultOwner,
SQLDMO_LPCSTR DefaultName, BOOL Bind);

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.