2005/5/9

     
 

class ODBCConnection

artefaktur
Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   Namespace Members   Compound Members   Related Pages  

acdk::sql::odbc::ODBCConnection Class Reference

#include <ODBCConnection.h>

Inheritance diagram for acdk::sql::odbc::ODBCConnection:

acdk::lang::Object acdk::sql::Connection acdk::lang::ObjectBase acdk::lang::dmi::StdDispatch List of all members.

Detailed Description

Provides a connection to ODBC data sources.

Todo:
The ODBC connection is not fully implemented.
  • Support more Data types in all classes. Currently only Strings and int are tested. Some other types are implemented, but not tested.
  • Support the set methods of the ResultSet
  • Support CallableConnection
  • Support / test transactions


Public Member Functions

virtual void clearWarnings ()
 JDKDOC: Clears all warnings reported for this Connection object.

virtual void close ()
 JDKDOC: Releases a Connection's database and JDBC resources immediately instead of waiting for them to be automatically released.

virtual void commit ()
 JDKDOC: Makes all changes made since the previous commit/rollback permanent and releases any database locks currently held by the Connection.

virtual RStatement createStatement ()
 JDKDOC: Creates a Statement object for sending SQL statements to the database.

virtual RStatement createStatement (int resultSetType, int resultSetConcurrency)
 JDKDOC: JDBC 2.0 Creates a Statement object that will generate ResultSet objects with the given type and concurrency.

virtual bool getAutoCommit ()
 JDKDOC: Gets the current auto-commit state.

virtual RString getCatalog ()
 JDKDOC: Returns the Connection's current catalog name.

virtual RDatabaseMetaData getMetaData ()
 JDKDOC: Gets the metadata regarding this connection's database.

virtual int getTransactionIsolation ()
 JDKDOC: Gets this Connection's current transaction isolation level.

virtual acdk::util::RMap getTypeMap ()
 JDKDOC: JDBC 2.0 Gets the type map object associated with this connection.

virtual::acdk::sql::RSQLWarning getWarnings ()
 JDKDOC: Returns the first warning reported by calls on this Connection.

virtual bool isClosed ()
 JDKDOC: Tests to see if a Connection is closed.

virtual bool isReadOnly ()
 JDKDOC: Tests to see if the connection is in read-only mode.

virtual RString nativeSQL (INP(RString) sql)
 JDKDOC: Converts the given SQL statement into the system's native SQL grammar.

virtual RCallableStatement prepareCall (INP(RString) sql)
 JDKDOC: Creates a CallableStatement object for calling database stored procedures.

virtual RPreparedStatement prepareStatement (INP(RString) sql)
 JDKDOC: Creates a PreparedStatement object for sending parameterized SQL statements to the database.

virtual void rollback ()
 JDKDOC: Drops all changes made since the previous commit/rollback and releases any database locks currently held by this Connection.

virtual void setAutoCommit (bool autoCommit)
 JDKDOC: Sets this connection's auto-commit mode.

virtual void setCatalog (INP(RString) catalog)
 JDKDOC: Sets a catalog name in order to select a subspace of this Connection's database in which to work.

virtual void setReadOnly (bool readOnly)
 JDKDOC: Puts this connection in read-only mode as a hint to enable database optimizations.

virtual void setTransactionIsolation (int level)
 JDKDOC: Attempts to change the transaction isolation level to the one given.

virtual void setTypeMap (INP(acdk::util::RMap) map)
 JDKDOC: JDBC 2.0 Installs the given type map as the type map for this connection.

virtual RODBCHandle _getODBCHandle ()
virtual RODBCDriver _getODBCDriver ()
 ODBCConnection (INP(RODBCDriver) driver)
 ~ODBCConnection ()
RODBCConnection init (INP(RString) url, INP(acdk::util::RProperties) prop)

Private Member Functions

void _setSQLFlag (SQLUINTEGER key, SQLUINTEGER val)
void _setSQLFlags ()
void _parseProperties (INP(acdk::util::RProperties) prop)

Private Attributes

RODBCDriver _driver
RODBCHandle _dbch
acdk::util::RProperties _prop
RString _url
int _loginTimeout
int _connectionTimeout
int _queryTimeout
bool _opened
bool _readOnly
bool _autoCommit
bool _asyncCalls
bool _traceCalls
int _maxRows
int _maxLength
bool _scanEscapes
bool _scrollableCursors


Constructor & Destructor Documentation

acdk::sql::odbc::ODBCConnection::ODBCConnection INP(RODBCDriver driver  ) 
 

acdk::sql::odbc::ODBCConnection::~ODBCConnection  ) 
 


Member Function Documentation

virtual RODBCDriver acdk::sql::odbc::ODBCConnection::_getODBCDriver  )  [inline, virtual]
 

virtual RODBCHandle acdk::sql::odbc::ODBCConnection::_getODBCHandle  )  [inline, virtual]
 

void acdk::sql::odbc::ODBCConnection::_parseProperties INP(acdk::util::RProperties prop  )  [private]
 

void acdk::sql::odbc::ODBCConnection::_setSQLFlag SQLUINTEGER  key,
SQLUINTEGER  val
[private]
 

void acdk::sql::odbc::ODBCConnection::_setSQLFlags  )  [private]
 

virtual void acdk::sql::odbc::ODBCConnection::clearWarnings  )  [inline, virtual]
 

JDKDOC: Clears all warnings reported for this Connection object.

API: JDK

Implements acdk::sql::Connection.

virtual void acdk::sql::odbc::ODBCConnection::close  )  [inline, virtual]
 

JDKDOC: Releases a Connection's database and JDBC resources immediately instead of waiting for them to be automatically released.

API: JDK

Implements acdk::sql::Connection.

virtual void acdk::sql::odbc::ODBCConnection::commit  )  [virtual]
 

JDKDOC: Makes all changes made since the previous commit/rollback permanent and releases any database locks currently held by the Connection.

API: JDK

Implements acdk::sql::Connection.

virtual RStatement acdk::sql::odbc::ODBCConnection::createStatement int  resultSetType,
int  resultSetConcurrency
[inline, virtual]
 

JDKDOC: JDBC 2.0 Creates a Statement object that will generate ResultSet objects with the given type and concurrency.

API: JDK

Implements acdk::sql::Connection.

virtual RStatement acdk::sql::odbc::ODBCConnection::createStatement  )  [virtual]
 

JDKDOC: Creates a Statement object for sending SQL statements to the database.

API: JDK

Implements acdk::sql::Connection.

virtual bool acdk::sql::odbc::ODBCConnection::getAutoCommit  )  [inline, virtual]
 

JDKDOC: Gets the current auto-commit state.

API: JDK

Implements acdk::sql::Connection.

virtual RString acdk::sql::odbc::ODBCConnection::getCatalog  )  [inline, virtual]
 

JDKDOC: Returns the Connection's current catalog name.

API: JDK

Implements acdk::sql::Connection.

virtual RDatabaseMetaData acdk::sql::odbc::ODBCConnection::getMetaData  )  [virtual]
 

JDKDOC: Gets the metadata regarding this connection's database.

API: JDK

Implements acdk::sql::Connection.

virtual int acdk::sql::odbc::ODBCConnection::getTransactionIsolation  )  [inline, virtual]
 

JDKDOC: Gets this Connection's current transaction isolation level.

API: JDK

Implements acdk::sql::Connection.

virtual acdk::util::RMap acdk::sql::odbc::ODBCConnection::getTypeMap  )  [inline, virtual]
 

JDKDOC: JDBC 2.0 Gets the type map object associated with this connection.

API: JDK

Todo:
not implemented

Implements acdk::sql::Connection.

virtual ::acdk::sql::RSQLWarning acdk::sql::odbc::ODBCConnection::getWarnings  )  [inline, virtual]
 

JDKDOC: Returns the first warning reported by calls on this Connection.

API: JDK

Todo:
test

Implements acdk::sql::Connection.

RODBCConnection acdk::sql::odbc::ODBCConnection::init INP(RString url,
INP(acdk::util::RProperties prop
 

virtual bool acdk::sql::odbc::ODBCConnection::isClosed  )  [inline, virtual]
 

JDKDOC: Tests to see if a Connection is closed.

API: JDK

Implements acdk::sql::Connection.

virtual bool acdk::sql::odbc::ODBCConnection::isReadOnly  )  [inline, virtual]
 

JDKDOC: Tests to see if the connection is in read-only mode.

API: JDK

Implements acdk::sql::Connection.

virtual RString acdk::sql::odbc::ODBCConnection::nativeSQL INP(RString sql  )  [inline, virtual]
 

JDKDOC: Converts the given SQL statement into the system's native SQL grammar.

API: JDK

Todo:
not implemented

Implements acdk::sql::Connection.

virtual RCallableStatement acdk::sql::odbc::ODBCConnection::prepareCall INP(RString sql  )  [virtual]
 

JDKDOC: Creates a CallableStatement object for calling database stored procedures.

API: JDK

Implements acdk::sql::Connection.

virtual RPreparedStatement acdk::sql::odbc::ODBCConnection::prepareStatement INP(RString sql  )  [virtual]
 

JDKDOC: Creates a PreparedStatement object for sending parameterized SQL statements to the database.

API: JDK

Implements acdk::sql::Connection.

virtual void acdk::sql::odbc::ODBCConnection::rollback  )  [inline, virtual]
 

JDKDOC: Drops all changes made since the previous commit/rollback and releases any database locks currently held by this Connection.

API: JDK

Todo:
not implemented

Implements acdk::sql::Connection.

virtual void acdk::sql::odbc::ODBCConnection::setAutoCommit bool  autoCommit  )  [inline, virtual]
 

JDKDOC: Sets this connection's auto-commit mode.

API: JDK

Todo:
test

Implements acdk::sql::Connection.

virtual void acdk::sql::odbc::ODBCConnection::setCatalog INP(RString catalog  )  [inline, virtual]
 

JDKDOC: Sets a catalog name in order to select a subspace of this Connection's database in which to work.

API: JDK

Todo:
not implemented

Implements acdk::sql::Connection.

virtual void acdk::sql::odbc::ODBCConnection::setReadOnly bool  readOnly  )  [inline, virtual]
 

JDKDOC: Puts this connection in read-only mode as a hint to enable database optimizations.

API: JDK

Implements acdk::sql::Connection.

virtual void acdk::sql::odbc::ODBCConnection::setTransactionIsolation int  level  )  [inline, virtual]
 

JDKDOC: Attempts to change the transaction isolation level to the one given.

API: JDK

Todo:
not implemented

Implements acdk::sql::Connection.

virtual void acdk::sql::odbc::ODBCConnection::setTypeMap INP(acdk::util::RMap map  )  [inline, virtual]
 

JDKDOC: JDBC 2.0 Installs the given type map as the type map for this connection.

API: JDK

Todo:
not implemented

Implements acdk::sql::Connection.


Member Data Documentation

bool acdk::sql::odbc::ODBCConnection::_asyncCalls [private]
 

bool acdk::sql::odbc::ODBCConnection::_autoCommit [private]
 

int acdk::sql::odbc::ODBCConnection::_connectionTimeout [private]
 

RODBCHandle acdk::sql::odbc::ODBCConnection::_dbch [private]
 

RODBCDriver acdk::sql::odbc::ODBCConnection::_driver [private]
 

int acdk::sql::odbc::ODBCConnection::_loginTimeout [private]
 

int acdk::sql::odbc::ODBCConnection::_maxLength [private]
 

int acdk::sql::odbc::ODBCConnection::_maxRows [private]
 

bool acdk::sql::odbc::ODBCConnection::_opened [private]
 

acdk::util::RProperties acdk::sql::odbc::ODBCConnection::_prop [private]
 

int acdk::sql::odbc::ODBCConnection::_queryTimeout [private]
 

bool acdk::sql::odbc::ODBCConnection::_readOnly [private]
 

bool acdk::sql::odbc::ODBCConnection::_scanEscapes [private]
 

bool acdk::sql::odbc::ODBCConnection::_scrollableCursors [private]
 

bool acdk::sql::odbc::ODBCConnection::_traceCalls [private]
 

RString acdk::sql::odbc::ODBCConnection::_url [private]