Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

OdbcDatabaseLayer Class Reference

#include <OdbcDatabaseLayer.h>

Inheritance diagram for OdbcDatabaseLayer:

DatabaseLayer DatabaseErrorReporter DatabaseStringConverter List of all members.

Public Member Functions

 OdbcDatabaseLayer ()
virtual ~OdbcDatabaseLayer ()
virtual bool Open ()
virtual bool Open (const wxString &strConnection)
virtual bool Open (const wxString &strDSN, const wxString &strUser, const wxString &strPassword)
virtual bool Close ()
 close database
virtual void BeginTransaction ()
 Begin a transaction.
virtual void Commit ()
 Commit the current transaction.
virtual void RollBack ()
 Rollback the current transaction.
virtual bool RunQuery (const wxString &strQuery, bool bParseQuery)
 Run an insert, update, or delete query on the database.
virtual DatabaseResultSetRunQueryWithResults (const wxString &strQuery)
 Run a select query on the database.
virtual PreparedStatementPrepareStatement (const wxString &strQuery)
 Prepare a SQL statement which can be reused with different parameters.
void InterpretErrorCodes (long nCode, SQLHSTMT stmth_ptr=NULL)
SQLHANDLE allocStmth ()

Constructor & Destructor Documentation

OdbcDatabaseLayer::OdbcDatabaseLayer  ) 
 

Definition at line 8 of file OdbcDatabaseLayer.cpp.

References InterpretErrorCodes(), DatabaseErrorReporter::ResetErrorCodes(), and DatabaseErrorReporter::ThrowDatabaseException().

OdbcDatabaseLayer::~OdbcDatabaseLayer  )  [virtual]
 

Definition at line 46 of file OdbcDatabaseLayer.cpp.

References Close(), InterpretErrorCodes(), and DatabaseErrorReporter::ThrowDatabaseException().


Member Function Documentation

SQLHANDLE OdbcDatabaseLayer::allocStmth  ) 
 

Definition at line 287 of file OdbcDatabaseLayer.cpp.

References InterpretErrorCodes(), DatabaseErrorReporter::ResetErrorCodes(), and DatabaseErrorReporter::ThrowDatabaseException().

void OdbcDatabaseLayer::BeginTransaction  )  [virtual]
 

Begin a transaction.

Implements DatabaseLayer.

Definition at line 185 of file OdbcDatabaseLayer.cpp.

References InterpretErrorCodes(), DatabaseErrorReporter::ResetErrorCodes(), and DatabaseErrorReporter::ThrowDatabaseException().

bool OdbcDatabaseLayer::Close  )  [virtual]
 

close database

Implements DatabaseLayer.

Definition at line 163 of file OdbcDatabaseLayer.cpp.

References DatabaseLayer::CloseResultSets(), DatabaseLayer::CloseStatements(), InterpretErrorCodes(), DatabaseErrorReporter::ResetErrorCodes(), and DatabaseErrorReporter::ThrowDatabaseException().

Referenced by ~OdbcDatabaseLayer().

void OdbcDatabaseLayer::Commit  )  [virtual]
 

Commit the current transaction.

Implements DatabaseLayer.

Definition at line 197 of file OdbcDatabaseLayer.cpp.

References InterpretErrorCodes(), DatabaseErrorReporter::ResetErrorCodes(), and DatabaseErrorReporter::ThrowDatabaseException().

void OdbcDatabaseLayer::InterpretErrorCodes long  nCode,
SQLHSTMT  stmth_ptr = NULL
 

Definition at line 346 of file OdbcDatabaseLayer.cpp.

References ERR_BUFFER_LEN, ERR_STATE_LEN, DatabaseErrorReporter::SetErrorCode(), and DatabaseErrorReporter::SetErrorMessage().

Referenced by allocStmth(), BeginTransaction(), Close(), Commit(), OdbcDatabaseLayer(), Open(), RollBack(), and ~OdbcDatabaseLayer().

bool OdbcDatabaseLayer::Open const wxString &  strDSN,
const wxString &  strUser,
const wxString &  strPassword
[virtual]
 

Definition at line 149 of file OdbcDatabaseLayer.cpp.

References Open().

bool OdbcDatabaseLayer::Open const wxString &  strConnection  )  [virtual]
 

Implements DatabaseLayer.

Definition at line 121 of file OdbcDatabaseLayer.cpp.

References Open().

bool OdbcDatabaseLayer::Open  )  [virtual]
 

Definition at line 65 of file OdbcDatabaseLayer.cpp.

References InterpretErrorCodes(), DatabaseErrorReporter::ResetErrorCodes(), and DatabaseErrorReporter::ThrowDatabaseException().

Referenced by Open().

PreparedStatement * OdbcDatabaseLayer::PrepareStatement const wxString &  strQuery  )  [virtual]
 

Prepare a SQL statement which can be reused with different parameters.

Implements DatabaseLayer.

Definition at line 302 of file OdbcDatabaseLayer.cpp.

References DatabaseLayer::LogStatementForCleanup().

Referenced by RunQuery(), and RunQueryWithResults().

void OdbcDatabaseLayer::RollBack  )  [virtual]
 

Rollback the current transaction.

Implements DatabaseLayer.

Definition at line 216 of file OdbcDatabaseLayer.cpp.

References InterpretErrorCodes(), DatabaseErrorReporter::ResetErrorCodes(), and DatabaseErrorReporter::ThrowDatabaseException().

bool OdbcDatabaseLayer::RunQuery const wxString &  strQuery,
bool  bParseQuery
[virtual]
 

Run an insert, update, or delete query on the database.

Implements DatabaseLayer.

Definition at line 235 of file OdbcDatabaseLayer.cpp.

References PrepareStatement(), DatabaseErrorReporter::ResetErrorCodes(), OdbcPreparedStatement::RunQuery(), and DatabaseErrorReporter::ThrowDatabaseException().

DatabaseResultSet * OdbcDatabaseLayer::RunQueryWithResults const wxString &  strQuery  )  [virtual]
 

Run a select query on the database.

Implements DatabaseLayer.

Definition at line 261 of file OdbcDatabaseLayer.cpp.

References DatabaseLayer::LogResultSetForCleanup(), PrepareStatement(), DatabaseErrorReporter::ResetErrorCodes(), OdbcPreparedStatement::RunQueryWithResults(), OdbcPreparedStatement::SetOneTimer(), and DatabaseErrorReporter::ThrowDatabaseException().


The documentation for this class was generated from the following files:
Generated on Sat May 13 17:31:35 2006 for databaselayer by  doxygen 1.4.1