SQL_CANCEL_QUERY_STMT¶

Applies to: ORAFlex SQLFlex MYSQLFlex PGFlex DB2Flex

This command is used to close any open cursors related to an SQL_EXECUTE_STMT. This should be used once the SQL statement has been executed and all rows have been fetched.

Syntax

SQL_CANCEL_QUERY_STMT [of {FileName}]

Parameter

Description

FileName

Name of the file (optional)

Example

SQL_SET_STMT         of Customer to "SELECT * FROM CUSTOMER WHERE STATUS = 'Active' "
SQL_PREPARE_STMT     of Customer
SQL_BINDCOLUMNS_STMT of Customer to DF_BIND_ALL_COLUMNS
SQL_EXECUTE_STMT     of Customer
Repeat
   SQL_FETCH_NEXT_ROW of Customer
   If (Found) Begin
      Showln Customer.FirstName
      Showln Customer.LastName
   End
Until (Not(Found))
SQL_CANCEL_QUERY_STMT of Customer