Executes the SQL statement specified by the string argument and possibly returns a result set.
Use this method if you want to prepare and execute a statement, or instead of calling sqlany_prepare() followed by sqlany_execute().
The following example shows how to execute a statement that returns a result set:
a_sqlany_stmt * stmt;
stmt = sqlany_execute_direct( sqlany_conn, "select * from employees" );
if( stmt && sqlany_num_cols( stmt ) > 0 ) {
while( sqlany_fetch_next( stmt ) ) {
int i;
for( i = 0; i < sqlany_num_cols( stmt ); i++ ) {
// Get column i data
}
}
sqlany_free_stmt( stmt );
}