How to: Remove Validation Rules

Visual Studio 2005

If you no longer want to use a field or record validation rule, you can remove it.

NoteNote

Validation rules are stored in the database (.dbc) file. Removing or deleting a database table removes and deletes all field and record validation rules associated with that table. However, stored procedures referenced by the removed or deleted validation rules remain.

To remove a field validation rule

  1. Open the database containing the table.

  2. Open the table in the Table Designer.

  3. In the Table Designer, select the field you want.

  4. In the Rule box from the Field validation area, delete the validation expression.

  5. In the Message box, delete the custom error message or expression.

  6. When you are finished, click OK.

For more information, see Fields Tab, Table Designer.

To remove a record validation rule

  1. Open the database containing the table.

  2. Open the table in the Table Designer.

  3. In the Table Designer, click the Table tab.

  4. In the Rule box from the Record validation area, delete the validation expression.

  5. In the Message box, delete the custom error message or expression.

  6. When you are finished, click OK.

For more information, see Table Tab, Table Designer.

To remove a validation rule programmatically

  1. Open the table with the USE command.

  2. Use the SQL ALTER TABLE command with the DROP CHECK clause.

For more information, see ALTER TABLE - SQL Command.

See Also

Community Additions

ADD
Show: