SQL_SAVE_BUFFER_BEGIN¶

Applies to: ORAFlex SQLFlex MYSQLFlex PGFlex DB2Flex

This command is used to initialize a SAVE_BUFFER statement. Doing this will allow a specified set of records to be stored in the buffer before a save takes place. Once the buffer is filled, it will be saved automatically. This set of commands can be used to efficiently save a large number of records. Once the buffer is full, the save occurs automatically and the buffer will be emptied out. It is good practice to use this method inside of a transaction to maintain atomicity. Note that these commands should not be used in conjuction with finds.

Syntax

SQL_SAVE_BUFFER_BEGIN of {FileName} to {variable}

Parameter

Description

FileName

Name of the file

variable

Number of records to store in the buffer

Example

Open Customer

SQL_SAVE_BUFFER_BEGIN of Transactions to 10

For i from 0 to 1000
    Move i to Transactions.ID
    SQL_SAVE_BUFFER of Transactions
Loop

SQL_SAVE_BUFFER_END of Customer