libodbc++
0.2.5
|
A simple non-prepared statement. More...
#include <statement.h>
Public Member Functions | |
virtual | ~Statement () |
Destructor. More... | |
Connection * | getConnection () |
Returns the connection that created this statement. | |
void | cancel () |
Cancel an ongoing operation that was executed in another thread. | |
virtual bool | execute (const std::string &sql) |
Execute a given SQL statement. More... | |
virtual ResultSet * | executeQuery (const std::string &sql) |
Execute an SQL statement, expected to return a resultset. More... | |
virtual int | executeUpdate (const std::string &sql) |
Execute an SQL statement, expected to return an update count. More... | |
int | getUpdateCount () |
Fetch the current result as an update count. More... | |
ResultSet * | getResultSet () |
Fetch the current result as a ResultSet. | |
bool | getMoreResults () |
Check if there are more results available on this statment. More... | |
void | setCursorName (const std::string &name) |
Set the cursor name for this statement. | |
int | getFetchSize () |
Fetch the current fetch size (also called rowset size) for resultsets created by this statement. | |
void | setFetchSize (int size) |
Set the current fetch size for resultsets created by this statement. | |
int | getResultSetConcurrency () |
Get the concurrency type for resultsets created by this statement. | |
int | getResultSetType () |
Get the type for resultsets created by this statement. | |
int | getQueryTimeout () |
Get the query timeout for this statement. | |
void | setQueryTimeout (int seconds) |
Set the query timeout for this statement. | |
int | getMaxRows () |
Get the maximum number of rows to return in a resultset. | |
void | setMaxRows (int maxRows) |
Set the maximum number of rows to return in a resultset. | |
int | getMaxFieldSize () |
Get the maximum field size for resultsets create by this statement. | |
void | setMaxFieldSize (int maxFieldSize) |
Set the maximum field size for resultsets create by this statement. | |
void | setEscapeProcessing (bool on) |
Sets escape processing on or off. More... | |
bool | getEscapeProcessing () |
Gets the current escape processing setting. More... | |
void | close () |
Closes all result sets from this execution. More... | |
![]() | |
void | clearWarnings () |
Clears all the warnings stored in this object. | |
WarningList * | getWarnings () |
Fetches all the warnings in this object. More... | |
virtual | ~ErrorHandler () |
Destructor. | |
Additional Inherited Members | |
![]() | |
ErrorHandler (bool collectWarnings=true) | |
Constructor. | |
A simple non-prepared statement.
|
virtual |
Destructor.
Destroys/closes this statement as well as all created resultsets.
void odbc::Statement::close | ( | ) |
Closes all result sets from this execution.
This is useful if you don't wish to iterate through all remaining results, or if your driver does not auto-close cursors.
|
virtual |
Execute a given SQL statement.
The statement can return multiple results. To get to the next result after processing the first one, getMoreResults() should be called.
sql | The string to execute |
|
virtual |
|
virtual |
Execute an SQL statement, expected to return an update count.
bool odbc::Statement::getEscapeProcessing | ( | ) |
Gets the current escape processing setting.
true
if escape processing is on, false
otherwise bool odbc::Statement::getMoreResults | ( | ) |
Check if there are more results available on this statment.
int odbc::Statement::getUpdateCount | ( | ) |
Fetch the current result as an update count.
-1
if the result is a ResultSet or if there are no more results. void odbc::Statement::setEscapeProcessing | ( | bool | on | ) |
Sets escape processing on or off.
For PreparedStatement
s, the command has been parsed on creation, so this setting won't really have any effect.