Public Member Functions | Static Public Member Functions | Protected Attributes

AppSecInc::Databases::ODBC::ODBCHandle Class Reference

An ODBC handle (smart pointer), bound to a connection. More...

#include <Handle.h>

List of all members.

Public Member Functions

SQLHANDLE Peek () const
 returns the ODBC handle
SQLHANDLE PeekConnection () const
 returns the connection handle
 ODBCHandle ()
virtual ~ODBCHandle ()
void Allocate (SQLSMALLINT type, SQLHANDLE hconn)
 allocates a handle, fails if a handle has been previously allocated
void Release ()
 releases the previously allocated handle, fails if no handle has been allocated
std::wstring GetError () const
 get the text representation of the errors on an ODBC handle
std::vector< ODBCErrorGetErrors () const
 get an array of errors on the current ODBC handle
std::vector< std::wstring > GetDiagFields (int diagidentifier) const
 get an array of messages on the current ODBC handle
std::vector
< ODBCDiagnosticsMessage
GetDiagMessages () const
 get an array of text messages on the current ODBC handle (cleaned up SQL_DIAG_MESSAGE_TEXT)

Static Public Member Functions

static std::wstring GetError (SQLHANDLE handle, int type)
 get the text representation of the errors on an ODBC handle
static std::vector< ODBCErrorGetErrors (SQLHANDLE handle, int type)
 get an array of errors on an ODBC handle
static std::vector< std::wstring > GetDiagFields (SQLHANDLE handle, int type, int diagidentifier)
static std::vector
< ODBCDiagnosticsMessage
GetDiagMessages (SQLHANDLE handle, int type)
 get diagnostics messages (cleaned up SQL_DIAG_MESSAGE_TEXT)

Protected Attributes

SQLSMALLINT _type
 type of handle
SQLHANDLE _handle
 ODBC handle.
SQLHANDLE _hconn
 ODBC connection handle.

Detailed Description

An ODBC handle (smart pointer), bound to a connection.


Constructor & Destructor Documentation

ODBCHandle::ODBCHandle ( )
ODBCHandle::~ODBCHandle ( ) [virtual]

Member Function Documentation

void ODBCHandle::Allocate ( SQLSMALLINT  type,
SQLHANDLE  hconn 
)

allocates a handle, fails if a handle has been previously allocated

std::vector<std::wstring> AppSecInc::Databases::ODBC::ODBCHandle::GetDiagFields ( int  diagidentifier) const [inline]

get an array of messages on the current ODBC handle

std::vector< std::wstring > ODBCHandle::GetDiagFields ( SQLHANDLE  handle,
int  type,
int  diagidentifier 
) [static]

get an array of diag fields or messages for a list of diag identifiers see http://msdn.microsoft.com/en-us/library/ms710181(VS.85).aspx

std::vector< ODBCDiagnosticsMessage > ODBCHandle::GetDiagMessages ( SQLHANDLE  handle,
int  type 
) [static]

get diagnostics messages (cleaned up SQL_DIAG_MESSAGE_TEXT)

std::vector<ODBCDiagnosticsMessage> AppSecInc::Databases::ODBC::ODBCHandle::GetDiagMessages ( ) const [inline]

get an array of text messages on the current ODBC handle (cleaned up SQL_DIAG_MESSAGE_TEXT)

std::wstring ODBCHandle::GetError ( SQLHANDLE  handle,
int  type 
) [static]

get the text representation of the errors on an ODBC handle

std::wstring AppSecInc::Databases::ODBC::ODBCHandle::GetError ( ) const [inline]

get the text representation of the errors on an ODBC handle

std::vector<ODBCError> AppSecInc::Databases::ODBC::ODBCHandle::GetErrors ( ) const [inline]

get an array of errors on the current ODBC handle

std::vector< ODBCError > ODBCHandle::GetErrors ( SQLHANDLE  handle,
int  type 
) [static]

get an array of errors on an ODBC handle

SQLHANDLE AppSecInc::Databases::ODBC::ODBCHandle::Peek ( ) const [inline]

returns the ODBC handle

SQLHANDLE AppSecInc::Databases::ODBC::ODBCHandle::PeekConnection ( ) const [inline]

returns the connection handle

void ODBCHandle::Release ( )

releases the previously allocated handle, fails if no handle has been allocated


Member Data Documentation

ODBC handle.

ODBC connection handle.

type of handle


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


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