SET SAFETY Command
Determines whether Visual FoxPro displays a dialog box before overwriting an existing file, or whether table or field rules, default values, and error messages are evaluated when changes are made in the Table Designer or with ALTER TABLE.
SET SAFETY ON | OFF
Parameters
ON
(Default) Specifies that a dialog box is displayed before you overwrite an existing file. The dialog box gives you the option of overwriting the existing file.For the Table Designer, specifies that table or field rules, default values, and error messages are evaluated when you save changes to a table's structure. Data validation occurs for new or modified validation rules after you save the table structure changes. If a validation rule contains a UDF (user-defined function), the UDF isn't evaluated and the validation rule is ignored.
For ALTER TABLE, table or field rules, default values, and error messages are evaluated when ALTER TABLE changes the table's structure. Data validation occurs for new or modified validation rules when ALTER TABLE changes the table's structure. If a validation rule contains a UDF (user-defined function), the UDF isn't evaluated and the validation rule is ignored.
OFF
Specifies that a dialog box isn't displayed before an existing file is overwritten. Note that for in-process .dll automation servers the default setting of SET SAFETY is OFF.For the Table Designer, specifies that table or field rules, default values, and error messages are not evaluated when you save changes to a table's structure. However, data validation occurs for new or modified validation rules after you save the table structure changes.
For ALTER TABLE, table or field rules, default values, and error messages are not evaluated when ALTER TABLE changes the table's structure. Data validation does not occur for new or modified validation rules after ALTER TABLE changes the table's structure.
Remarks
SET SAFETY is scoped to the current data session.