sp_bindmsg

Description

Binds a user message to a referential integrity constraint or check constraint.

Syntax

sp_bindmsg constrname, msgid

Parameters

constrname

is the name of the integrity constraint to which you are binding a message. Use the constraint clause of the create table command, or the add constraint clause of the alter table command to create and name constraints.

msgid

is the number of the user message to be bound to an integrity constraint. The message must exist in the sysusermessages table in the local database prior to calling sp_bindmsg.

Examples

Example 1

sp_bindmsg positive_balance, 20100

Binds user message number 20100 to the positive_balance constraint.

Usage

Permissions

Only the object owner can execute sp_bindmsg.

See also

Commands alter table, create table

System procedures sp_addmessage, sp_getmessage, sp_unbindmsg