Public Member Functions | List of all members
AppSecInc::Databases::ODBC::ODBCRowSet Class Reference

An ODBC rowset. More...

#include <RowSet.h>

Public Member Functions

const std::vector
< ODBCDiagnosticsMessage > & 
GetMessages () const
 get the executed statement messages More...
 
unsigned int GetColumnCount () const
 get the number of columns More...
 
const ODBCColumnoperator[] (const std::wstring &name) const
 get a column by name More...
 
const ODBCColumnoperator[] (int index) const
 get a column by index More...
 
const ODBCHandlePeekStatementHandle () const
 get the statement handle More...
 
void AddColumn (const std::wstring &name, int type, int size=ODBCColumn::INVALID_SIZE)
 add a named column with a defined type and initial size More...
 
void Bind (SQLHANDLE hconn)
 bind the rowset to a connection More...
 
void BindColumns ()
 bind columns More...
 
bool Fetch ()
 
void ExecuteDirect (const std::wstring &query)
 execute the query More...
 
void Prepare (const std::wstring &query)
 execute the query More...
 
void Execute ()
 execute the query More...
 
std::wstring GetError () const
 get the text representation of the errors on an ODBC connection handle More...
 
std::vector< ODBCErrorGetErrors () const
 get an array of errors on the current ODBC connection More...
 
SQLSMALLINT GetNumResultCols () const
 get the actual column count in the result set More...
 
SQLINTEGER GetSQLRowCount () const
 
 ODBCRowSet ()
 
virtual ~ODBCRowSet ()
 

Detailed Description

An ODBC rowset.

Constructor & Destructor Documentation

ODBCRowSet::ODBCRowSet ( )
ODBCRowSet::~ODBCRowSet ( )
virtual

Member Function Documentation

void ODBCRowSet::AddColumn ( const std::wstring &  name,
int  type,
int  size = ODBCColumn::INVALID_SIZE 
)

add a named column with a defined type and initial size

void ODBCRowSet::Bind ( SQLHANDLE  hconn)

bind the rowset to a connection

void ODBCRowSet::BindColumns ( )

bind columns

SQLDescribeCol returns the size of the column in characters, ODBCColumn accepts size in bytes

void ODBCRowSet::Execute ( )

execute the query

void ODBCRowSet::ExecuteDirect ( const std::wstring &  query)

execute the query

bool ODBCRowSet::Fetch ( )

fetch the next row

Returns
true if no more rows
unsigned int AppSecInc::Databases::ODBC::ODBCRowSet::GetColumnCount ( ) const
inline

get the number of columns

std::wstring AppSecInc::Databases::ODBC::ODBCRowSet::GetError ( ) const
inline

get the text representation of the errors on an ODBC connection handle

std::vector<ODBCError> AppSecInc::Databases::ODBC::ODBCRowSet::GetErrors ( ) const
inline

get an array of errors on the current ODBC connection

const std::vector<ODBCDiagnosticsMessage>& AppSecInc::Databases::ODBC::ODBCRowSet::GetMessages ( ) const
inline

get the executed statement messages

SQLSMALLINT ODBCRowSet::GetNumResultCols ( ) const

get the actual column count in the result set

SQLINTEGER ODBCRowSet::GetSQLRowCount ( ) const

get the cached row count in the result set

Returns
-1 if the affected row count is not available
const ODBCColumn * ODBCRowSet::operator[] ( const std::wstring &  name) const

get a column by name

const ODBCColumn * ODBCRowSet::operator[] ( int  index) const

get a column by index

const ODBCHandle& AppSecInc::Databases::ODBC::ODBCRowSet::PeekStatementHandle ( ) const
inline

get the statement handle

void ODBCRowSet::Prepare ( const std::wstring &  query)

execute the query


The documentation for this class was generated from the following files:


© Application Security Inc. - All Rights Reserved http://msiext.codeplex.com