Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

CTBodbcConnect Class Reference

DB connection object. **. More...

#include "CTBodbcConnect.hxx"

List of all members.

Public Methods

 CTBodbcConnect ()
 ~CTBodbcConnect ()
bool Connect (const char *c_dcs)
bool Disconnect ()
bool Connected () const
bool AutoCommit (bool b_val)
bool Commit ()
bool Rollback ()
bool Trace (bool b_trace)
void PrintError (ostream &os=cout)
HENV & Henv ()
HDBC & Hdbc ()
void ToStream (ostream &os=cout) const
bool operator! () const
 operator bool () const

Private Methods

void TraceODBCCall (const char *c_text, RETCODE i_rc)
void PrintInfo (UWORD i_infotype, const char *c_prefix, ostream &os=cout) const

Private Attributes

HDBC m_hdbc
bool mb_connected
bool mb_trace

Static Private Attributes

HENV m_henv

Friends

class CTBodbcStatement

Related Functions

(Note that these are not member functions.)

ostream & operator<< (ostream &os, const CTBodbcConnect &obj)


Detailed Description

DB connection object. **.

Definition at line 18 of file CTBodbcConnect.hxx.


Constructor & Destructor Documentation

CTBodbcConnect::CTBodbcConnect
 

Default constructor.

Definition at line 26 of file CTBodbcConnect.cxx.

CTBodbcConnect::~CTBodbcConnect
 

Destructor.

Definition at line 36 of file CTBodbcConnect.cxx.


Member Function Documentation

bool CTBodbcConnect::Connect const char * c_dcs
 

Connect with DCS.

Definition at line 44 of file CTBodbcConnect.cxx.

bool CTBodbcConnect::Disconnect
 

Disconnect.

Definition at line 104 of file CTBodbcConnect.cxx.

Referenced by ~CTBodbcConnect().

bool CTBodbcConnect::Connected const [inline]
 

Returns true if connected.

Definition at line 15 of file CTBodbcConnect.icc.

bool CTBodbcConnect::AutoCommit bool b_val
 

Set autocommit mode to b_val.

Definition at line 123 of file CTBodbcConnect.cxx.

bool CTBodbcConnect::Commit
 

Commit all outstanding transactions.

Definition at line 141 of file CTBodbcConnect.cxx.

bool CTBodbcConnect::Rollback
 

Rollback all outstanding transactions.

Definition at line 158 of file CTBodbcConnect.cxx.

bool CTBodbcConnect::Trace bool b_trace
 

Enable or disable ODBC call trace.

Definition at line 175 of file CTBodbcConnect.cxx.

void CTBodbcConnect::PrintError ostream & os = cout
 

Print c+e errors to stream os.

Definition at line 185 of file CTBodbcConnect.cxx.

Referenced by AutoCommit(), Commit(), Connect(), CTBodbcStatement::PrintError(), and Rollback().

HENV & CTBodbcConnect::Henv [inline]
 

Access environment handle.

Definition at line 23 of file CTBodbcConnect.icc.

HENV & CTBodbcConnect::Hdbc [inline]
 

Access connection handle.

Definition at line 31 of file CTBodbcConnect.icc.

void CTBodbcConnect::ToStream ostream & os = cout const
 

ostream insertion.

Definition at line 204 of file CTBodbcConnect.cxx.

Referenced by operator<<().

bool CTBodbcConnect::operator! const [inline]
 

Returns true if not connected.

Definition at line 39 of file CTBodbcConnect.icc.

CTBodbcConnect::operator bool const [inline]
 

Returns true if connected.

Definition at line 47 of file CTBodbcConnect.icc.

void CTBodbcConnect::TraceODBCCall const char * c_text,
RETCODE i_rc
[private]
 

Trace ODBC call.

Print the message c_text to cout and append it with a mnemonic representation of the associated status code passed in i_rc.

Definition at line 339 of file CTBodbcConnect.cxx.

Referenced by CTBodbcStatement::AllocIfNull(), AutoCommit(), CTBodbcStatement::BindCol(), CTBodbcStatement::BindIParameter(), CTBodbcStatement::Close(), Commit(), Connect(), CTBodbcStatement::DescribeCol(), Disconnect(), CTBodbcStatement::Execute(), CTBodbcStatement::Fetch(), CTBodbcStatement::GetData(), CTBodbcStatement::NumResultCols(), CTBodbcStatement::Prepare(), Rollback(), CTBodbcStatement::UnbindCol(), CTBodbcStatement::UnbindParameter(), and CTBodbcStatement::~CTBodbcStatement().

void CTBodbcConnect::PrintInfo UWORD i_infotype,
const char * c_prefix,
ostream & os = cout
const [private]
 

Print info.

Definition at line 371 of file CTBodbcConnect.cxx.

Referenced by ToStream().


Friends And Related Function Documentation

friend class CTBodbcStatement [friend]
 

Definition at line 21 of file CTBodbcConnect.hxx.

ostream & operator<< ostream & os,
const CTBodbcConnect & obj
[related]
 

ostream insertion operator.

Definition at line 58 of file CTBodbcConnect.icc.


Member Data Documentation

HDBC CTBodbcConnect::m_hdbc [private]
 

ODBC DBconnect handle.

Definition at line 54 of file CTBodbcConnect.hxx.

bool CTBodbcConnect::mb_connected [private]
 

connected flag.

Definition at line 55 of file CTBodbcConnect.hxx.

bool CTBodbcConnect::mb_trace [private]
 

trace all ODBC calls.

Definition at line 56 of file CTBodbcConnect.hxx.

HENV CTBodbcConnect::m_henv [static, private]
 

ODBC Environment handle.

Definition at line 386 of file CTBodbcConnect.cxx.


The documentation for this class was generated from the following files:
Generated at Fri Oct 24 18:16:05 2003 for CTBodbc by doxygen1.2.9-20010812 written by Dimitri van Heesch, © 1997-2001