ClearFile statement
Description
Deletes all rows from a table, but retains the table structure.
Syntax
ClearFile filevar Then Else statements
Parameters
The ClearFile statement has the following parameters.
Parameter | Description |
---|---|
Filevar | A file variable created by a previous Open statement. |
Then | The statement(s) following Then are executed if a table is cleared successfully. For more information about the use of Then and Else, refer to "If/Then statement" description in this chapter. |
Else | The statement(s) following Else are executed if the table cannot be cleared. The Status() function indicates the severity of the error, and the system variable @FILE_ERROR contains details about the nature of the error. |
See Also
Example
* The code opens a particular file, then clears it. file = "TEST_FILE" Open file To file_var Then ClearFile file_var Else GoSub clear_failed End End