SPQLPERFORM() API Function

Submits an SQL statement for execution on a given connection.

Valid in: SPD Server

Syntax

int spqlperform(void *contok, char *stmtbuf, int stmtlen, int *actions, void **stmttok)

Required Arguments

void *contok

connection used to execute the SQL statement.

int stmtlen

length of the SQL statement in buffer; -1 if null-terminated.

char *stmtbuf

buffer that holds the SQL statement to perform.

int *actions

returns post-processing notification flags.

void **stmttok

returns a statement token to use in post-processing the SQL statement results. See post-processing action definitions for use of statement token.

Details

SPQLPERFORM() function performs specified SQL statement and informs caller of the results. The actions parameter returns a value of 0 if no additional action is required. If actions are required to complete the statement, one or more of the following bit flags are returned.
   Flag          Action
   ----------    ---------------
   SPQLDATA      Data is returned(see spqlfetch())
   SPQLCOLINFO   Column information is returned(see spqlcolinfo())
Returns: 0 if the SQL statement is successfully prepared or executed; SPQL_BADSTMT if the SQL statement specified in the statement buffer is prepared incorrectly; SPQL_NOMEM if SPQLPERFORM() function cannot allocate memory for the statement token.
Last updated: February 8, 2017