16 std::vector<ODBCColumn *> _columns;
18 std::map<std::wstring, ODBCColumn *> _columnmap;
20 std::vector<ODBCDiagnosticsMessage> _messages;
25 const std::vector<ODBCDiagnosticsMessage>&
GetMessages()
const {
return _messages; }
37 void Bind(SQLHANDLE hconn);
46 void Prepare(
const std::wstring& query);
SQLSMALLINT GetNumResultCols() const
get the actual column count in the result set
Definition: RowSet.cpp:168
SQLINTEGER GetSQLRowCount() const
Definition: RowSet.cpp:179
const std::vector< ODBCDiagnosticsMessage > & GetMessages() const
get the executed statement messages
Definition: RowSet.h:25
void BindColumns()
bind columns
Definition: RowSet.cpp:60
static const SQLINTEGER INVALID_SIZE
invalid data size
Definition: Buffer.h:23
static std::vector< ODBCError > GetErrors(SQLHANDLE handle, int type)
get an array of errors on an ODBC handle
Definition: Handle.cpp:132
bool Fetch()
Definition: RowSet.cpp:145
ODBCRowSet()
Definition: RowSet.cpp:6
An ODBC rowset.
Definition: RowSet.h:10
virtual ~ODBCRowSet()
Definition: RowSet.cpp:11
An ODBC handle (smart pointer), bound to a connection.
Definition: Handle.h:31
std::vector< ODBCError > GetErrors() const
get an array of errors on the current ODBC connection
Definition: RowSet.h:52
void ExecuteDirect(const std::wstring &query)
execute the query
Definition: RowSet.cpp:134
unsigned int GetColumnCount() const
get the number of columns
Definition: RowSet.h:27
void Prepare(const std::wstring &query)
execute the query
Definition: RowSet.cpp:125
std::wstring GetError() const
get the text representation of the errors on an ODBC connection handle
Definition: RowSet.h:50
const ODBCColumn * operator[](const std::wstring &name) const
get a column by name
Definition: RowSet.cpp:37
void Bind(SQLHANDLE hconn)
bind the rowset to a connection
Definition: RowSet.cpp:55
static std::wstring GetError(SQLHANDLE handle, int type)
get the text representation of the errors on an ODBC handle
Definition: Handle.cpp:158
const ODBCHandle & PeekStatementHandle() const
get the statement handle
Definition: RowSet.h:33
An ODBC column.
Definition: Column.h:10
void Execute()
execute the query
Definition: RowSet.cpp:98
void AddColumn(const std::wstring &name, int type, int size=ODBCColumn::INVALID_SIZE)
add a named column with a defined type and initial size
Definition: RowSet.cpp:20