Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   SQL Statements >

FLUSH

Use the FLUSH statement to force rows that a PUT statement buffered to be written to the database.

Use this statement, which is an extension to the ANSI/ISO standard for SQL, with ESQL/C.

Syntax

Read syntax diagramSkip visual syntax diagram>>-FLUSH--+-cursor_id-----+------------------------------------><
          '-cursor_id_var-'
 
Element Description Restrictions Syntax
cursor_id Name of a cursor Must have been declared Identifier
cursor_id_var Host variable that holds the value of cursor_id Must be a character data type Language specific

Usage

The PUT statement adds a row to a buffer, whose content is written to the database when the buffer is full. Use the FLUSH statement to force the insertion when the buffer is not full.

If the program terminates without closing the cursor, the buffer is left unflushed. Rows placed into the buffer since the last flush are lost. Do not expect the end of the program to close the cursor and flush the buffer automatically. The following example shows a FLUSH statement that operates on a cursor called icurs:

FLUSH icurs 
Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]