SAGQDECL
Description
The SAGQDECL function declares a cursor (without hold option) for a previously prepared statement identified by stmt_id_ptr. Declaring a cursor is optional (but recommended) and is required only if specific processing on a cursor is performed.
If used, stmt_id_ptr in the subsequent open call (SAGQOPEN) must be set to NULL (null pointer). Otherwise, a cursor (without hold option) will be implicitly declared within the open function.
Example
sagqdecl (
int anchor,
SQL_CTR_BLOCK * sql_cb_ptr,
char * cursor_ptr,
char * stmt_id_ptr
);

cursor_ptr | The cursor for declaration.
stmt_id_ptr | The statement id for declaration. Returned by SAGQPREP.

For information about anchor (required by each SAGQ* SQL function), see the ACEAPI SQL Functions page.