The Table_SetDeleteOptions() function allows you to choose whether a delete all or drop will be executed when the delete table statement is used.
Table_SetDeleteOptions(option)
• option – A boolean that sets the delete table functionality:
Value |
Description |
---|---|
true |
Use the drop functionality, which removes the data and the table from the database. This also removes the auto-generated stored procedures for the table. |
false |
Use the delete all functionality, which removes all of the data in the table, leaving the empty table intact in the database. |
The boolean value true.
Drop is the default setting for the Dexterity delete table statement, so if this function isn’t used in your application, the delete table statement will always use the drop functionality.
Your application’s performance may be slower when the drop functionality is used, since tables that have been dropped must be re-created the next time a user attempts to access them. However, using the drop functionality ensures that any changes made to the table definition will be incorporated in the table the next time it is created.
Be sure to take the Table_SetCreateMode() function into consideration when deciding which delete functionality to use. If Table_SetCreateMode() is set to false (not creating tables if they aren’t found), then a deleted table won’t be created automatically and an error message will be displayed the next time a user tries to access it. To have Dexterity automatically create a dropped table the next time a user tries to access it, you must use Table_SetCreateMode() to set the autocreate functionality to true, before the user attempts to access the table. |