Navigation:  Reference > Commands >

Clear File Buffer

Print this Topic Previous pageReturn to chapter overviewNext page

 

This command will clear the internal record buffer for a particular file.

 

CLR file_num Required - The number/handle of the file to be cleared.

 

what-to-doBUFF - Both the record number holder and the record buffer are cleared.  This is the default option.

       REC - The program will clear just the record number holder, effectively setting the record internally as not active.

 

COMMENTS

If a record is active in memory, there is data in both the buffer and record number holder.  If this record is saved to disk it will update the record currently at that record number.  If the record number holder is cleared, the program will save a new record.  Through the use of this command, if you clear just the record number holder, you can set up a process where some or all of the previous record can be used as default values for the new record and still save a new record when the SAVE command is executed.

 

NOTE:  If you are using Pervasive (Btrieve), when a record buffer is cleared, either during this command or OPENV (Open File), SAVE or DELETE, the buffer is set to binary 0s.  However, if you are using CodeBase the values will be set depending on the type of field in the record.

 

NOTE:  If you specify the file number you must preface the variable with the '@' symbol, e.g.: @bkarcust_hndl.

 

Example code

Clr bkarcust //this would be used with the OPEN command.

 

Clr @bkarcust_hndl   //this would be used with the OPENV command. BUFF/REC option

 

 

 

 


Page url: http://www.cassoftware.com/tas/manual/clearfilebuffer.htm