ClearFile statement

Deletes all rows from a table, but retains the table structure.

ClearFile filevar Then Else statements

The ClearFile statement has the following parameters.

ParameterDescription
FilevarA file variable created by a previous Open statement.
ThenThe 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.
ElseThe 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.
* 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
  • guides/programming/programmers_reference_manual/clearfile.txt
  • Last modified: 2024/06/19 20:20
  • by 127.0.0.1