sqlany_prepare function

Prepares the supplied SQL string

Syntax
a_sqlany_stmt * sqlany_prepare( a_sqlany_connection * conn, const char * sql )
Parameters
  • conn   A connection object with a connection established using sqlany_connect.

  • sql   The SQL statement to be prepared.

Returns

A handle to a SQL Anywhere statement object.

Remarks

The statement associated with the statement object is executed by sqlany_execute. You can use sqlany_free_stmt to free the resources associated with the statement object.

See also
Example
char * str;
a_sqlany_stmt * stmt;

str = "select * from employees where salary >= ?";
stmt = sqlany_prepare( conn, str );
if( stmt == NULL ) {
    // Failed to prepare statement, call sqlany_error() for more info
}