Prepared statement.
More...
|
enum | vtm_sql_stmt_state { VTM_SQL_STMT_STATE_READY,
VTM_SQL_STMT_STATE_OPEN_RESULT
} |
|
Bind parameters to statement.
- Parameters
-
stmt | the statement where the parameters should be bound to |
bind | the dataset containing the parameter values |
- Returns
- VTM_OK if parameter successfully bound
-
VTM_E_SQL_PENDING_RESULT if there is an open resultset from this statement that has not been processed yet
-
VTM_E_SQL_UNKOWN or VTM_ERROR if an unknown error occured
VTM_API int vtm_sql_stmt_execute |
( |
struct vtm_sql_stmt * |
stmt | ) |
|
Executes the statement.
- Parameters
-
stmt | the statement that should be executed |
- Returns
- VTM_OK if the statment was successfully executed
-
VTM_E_SQL_PENDING_RESULT if there is an open resultset from this statement that has not been processed yet
-
VTM_E_SQL_UNKOWN or VTM_ERROR if an unknown error occured
Executes the statement and returns a result set.
- Parameters
-
stmt | the statement that should be executed |
result | result set that should be initialized |
- Returns
- VTM_OK if the statment was successfully executed
-
VTM_E_SQL_PENDING_RESULT if there is already an open resultset from this statement that has not been processed yet
-
VTM_E_SQL_NO_RESULT if the executed statement does not return rows for example an INSERT or UPDATE statement
-
VTM_E_SQL_UNKOWN or VTM_ERROR if an unknown error occured
VTM_API void vtm_sql_stmt_release |
( |
struct vtm_sql_stmt * |
stmt | ) |
|
Releases the statement.
After this call the statement is no longer valid for use in other functions.
- Parameters
-
stmt | the statement that should be released |