Tuesday, January 18, 2011

jBase Infobasic Command CLEARFILE

Use the CLEARFILE statement to clear all the data from a file previously opened with the OPEN statement.

Command Syntax

CLEARFILE {variable} {SETTING setvar} {ON ERROR statements}

Syntax Elemenys

The variable should be the subject of an OPEN statement before the execution of CLEARFILE upon it.If the variable is omitted from the CLEARFILE statement, it assumes the default file variable as per the OPEN statement.

Notes

The CLEARFILE statement will remove every database record on the file against which it is executed, therefore, use with caution. If the variable argument does not describe a previously opened file, the program will enter the debugger with an appropriate message. If the SETTING clause is specified and the CLEARFILE fails, it sets setvar to one of the following values:

Incremental File Errors

128 => No such file or directory
4096 => Network error
24576 => Permission denied
32768 => Physical I/O error or unknown error

EXAMPLES

OPEN "DATAFILE" ELSE ABORT 201, "DATAFILE"
OPEN "PROGFILE" TO FILEVAR ELSE ABORT 201, "PROGFILE"
CLEARFILE
CLEARFILE FILEVAR

0 comments:

Post a Comment

 

Blog Info

A Pakistani Website by Originative Systems

Total Pageviews

Tutorial Jinni Copyright © 2015 WoodMag is Modified by Originative Systems