The CheckRuleSyntax method validates the syntax of a Transact-SQL database rule prior to creating it.
Syntax
object.CheckRuleSyntax( Rule )
object
Expression that evaluates to an object in the Applies To list
Rule
definition
Prototype (C/C++)
HRESULT CheckRuleSyntax(LPSQLDMORULE Rule);
Remarks
Database defaults and rules cannot be modified once they are created. They must first be dropped and then recreated. An application can call the CheckDefaultSyntax or CheckRuleSyntax method to validate the syntax of a Transact-SQL database rule prior to its creation.
An application might call the CheckDefaultSyntax or CheckRuleSyntax in a scenario in which a rule or default already exists, and it is necessary to change the definition (specified by the Text property). The application:
Note CheckRuleSyntax can be used with Microsoft® SQL Server™ 2000 and SQL Server 7.0.