Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
AppSecInc::Databases::ODBC::ODBCHandle Class Reference

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

#include <Handle.h>

Public Member Functions

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

Static Public Member Functions

static std::wstring GetError (SQLHANDLE handle, int type)
 get the text representation of the errors on an ODBC handle More...
 
static std::vector< ODBCErrorGetErrors (SQLHANDLE handle, int type)
 get an array of errors on an ODBC handle More...
 
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) More...
 

Protected Attributes

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

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 > 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<std::wstring> AppSecInc::Databases::ODBC::ODBCHandle::GetDiagFields ( int  diagidentifier) const
inline

get an array of messages on the current ODBC handle

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 > ODBCHandle::GetErrors ( SQLHANDLE  handle,
int  type 
)
static

get an array of 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

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

SQLHANDLE AppSecInc::Databases::ODBC::ODBCHandle::_handle
protected

ODBC handle.

SQLHANDLE AppSecInc::Databases::ODBC::ODBCHandle::_hconn
protected

ODBC connection handle.

SQLSMALLINT AppSecInc::Databases::ODBC::ODBCHandle::_type
protected

type of handle


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


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