Public Member Functions

AppSecInc::Databases::ODBC::ODBCRowSet Class Reference

An ODBC rowset. More...

#include <RowSet.h>

List of all members.

Public Member Functions

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