TODBCServer Class Reference

#include <TODBCServer.h>

Inheritance diagram for TODBCServer:

TSQLServer TObject TObject List of all members.

Public Member Functions

 TODBCServer (const char *db, const char *uid, const char *pw)
virtual ~TODBCServer ()
void Close (Option_t *opt="")
TSQLResultQuery (const char *sql)
Bool_t Exec (const char *sql)
TSQLStatementStatement (const char *sql, Int_t=100)
Bool_t HasStatement () const
Int_t SelectDataBase (const char *dbname)
TSQLResultGetDataBases (const char *wild=0)
TSQLResultGetTables (const char *dbname, const char *wild=0)
TListGetTablesList (const char *wild=0)
TSQLTableInfoGetTableInfo (const char *tablename)
TSQLResultGetColumns (const char *dbname, const char *table, const char *wild=0)
Int_t GetMaxIdentifierLength ()
Int_t CreateDataBase (const char *dbname)
Int_t DropDataBase (const char *dbname)
Int_t Reload ()
Int_t Shutdown ()
const char * ServerInfo ()
Bool_t StartTransaction ()
Bool_t Commit ()
Bool_t Rollback ()

Static Public Member Functions

static TListGetDrivers ()
static void PrintDrivers ()
static TListGetDataSources ()
static void PrintDataSources ()

Private Member Functions

Bool_t ExtractErrors (SQLRETURN retcode, const char *method)
Bool_t EndTransaction (Bool_t commit)

Static Private Member Functions

static TListListData (Bool_t isdrivers)

Private Attributes

SQLHENV fHenv
SQLHDBC fHdbc
TString fServerInfo
TString fUserId

Detailed Description

Definition at line 32 of file TODBCServer.h.


Constructor & Destructor Documentation

TODBCServer::TODBCServer ( const char *  db,
const char *  uid,
const char *  pw 
)

TODBCServer::~TODBCServer (  )  [virtual]

Definition at line 225 of file TODBCServer.cxx.

References Close(), and TSQLServer::IsConnected().


Member Function Documentation

Bool_t TODBCServer::ExtractErrors ( SQLRETURN  retcode,
const char *  method 
) [private]

Definition at line 338 of file TODBCServer.cxx.

References fHdbc, fHenv, i, kFALSE, kTRUE, len, TSQLServer::SetError(), and text().

Referenced by EndTransaction(), Exec(), GetColumns(), GetMaxIdentifierLength(), GetTableInfo(), GetTables(), Query(), SelectDataBase(), StartTransaction(), and Statement().

Bool_t TODBCServer::EndTransaction ( Bool_t  commit  )  [private]

Definition at line 842 of file TODBCServer.cxx.

References CheckConnect, ExtractErrors(), fHdbc, kFALSE, kTRUE, and method.

Referenced by Commit(), and Rollback().

TList * TODBCServer::ListData ( Bool_t  isdrivers  )  [static, private]

Definition at line 234 of file TODBCServer.cxx.

References TList::Add(), kTRUE, n, TCollection::SetOwner(), and strcpy().

Referenced by GetDataSources(), and GetDrivers().

TList * TODBCServer::GetDrivers (  )  [static]

Definition at line 286 of file TODBCServer.cxx.

References kTRUE, and ListData().

Referenced by PrintDrivers().

void TODBCServer::PrintDrivers (  )  [static]

Definition at line 297 of file TODBCServer.cxx.

References GetDrivers(), and n.

TList * TODBCServer::GetDataSources (  )  [static]

Definition at line 312 of file TODBCServer.cxx.

References kFALSE, and ListData().

Referenced by PrintDataSources().

void TODBCServer::PrintDataSources (  )  [static]

Definition at line 323 of file TODBCServer.cxx.

References GetDataSources(), and n.

void TODBCServer::Close ( Option_t opt = ""  )  [virtual]

Implements TSQLServer.

Definition at line 376 of file TODBCServer.cxx.

References fHdbc, fHenv, and TSQLServer::fPort.

Referenced by ~TODBCServer().

TSQLResult * TODBCServer::Query ( const char *  sql  )  [virtual]

Implements TSQLServer.

Definition at line 387 of file TODBCServer.cxx.

References CheckConnect, ExtractErrors(), and fHdbc.

Bool_t TODBCServer::Exec ( const char *  sql  )  [virtual]

Reimplemented from TSQLServer.

Definition at line 410 of file TODBCServer.cxx.

References CheckConnect, ExtractErrors(), and fHdbc.

TSQLStatement * TODBCServer::Statement ( const char *  sql,
Int_t  = 100 
) [virtual]

Reimplemented from TSQLServer.

Definition at line 779 of file TODBCServer.cxx.

References CheckConnect, ExtractErrors(), TSQLServer::fErrorOut, fHdbc, and TSQLServer::SetError().

Bool_t TODBCServer::HasStatement (  )  const [inline, virtual]

Reimplemented from TSQLServer.

Definition at line 59 of file TODBCServer.h.

References kTRUE.

Int_t TODBCServer::SelectDataBase ( const char *  dbname  )  [virtual]

Implements TSQLServer.

Definition at line 432 of file TODBCServer.cxx.

References CheckConnect, ExtractErrors(), TSQLServer::fDB, and fHdbc.

TSQLResult * TODBCServer::GetDataBases ( const char *  wild = 0  )  [virtual]

Implements TSQLServer.

Definition at line 449 of file TODBCServer.cxx.

References CheckConnect.

TSQLResult * TODBCServer::GetTables ( const char *  dbname,
const char *  wild = 0 
) [virtual]

Implements TSQLServer.

Definition at line 462 of file TODBCServer.cxx.

References CheckConnect, ExtractErrors(), fHdbc, and NULL.

Referenced by GetTablesList().

TList * TODBCServer::GetTablesList ( const char *  wild = 0  )  [virtual]

Reimplemented from TSQLServer.

Definition at line 510 of file TODBCServer.cxx.

References TList::Add(), CheckConnect, GetTables(), kTRUE, row, and TCollection::SetOwner().

TSQLTableInfo * TODBCServer::GetTableInfo ( const char *  tablename  )  [virtual]

Reimplemented from TSQLServer.

Definition at line 544 of file TODBCServer.cxx.

References TList::Add(), CheckConnect, ExtractErrors(), fHdbc, TSQLServer::kSQL_BINARY, TSQLServer::kSQL_CHAR, TSQLServer::kSQL_DOUBLE, TSQLServer::kSQL_FLOAT, TSQLServer::kSQL_INTEGER, TSQLServer::kSQL_NONE, TSQLServer::kSQL_NUMERIC, TSQLServer::kSQL_TIMESTAMP, TSQLServer::kSQL_VARCHAR, NULL, REM_LEN, and STR_LEN.

TSQLResult * TODBCServer::GetColumns ( const char *  dbname,
const char *  table,
const char *  wild = 0 
) [virtual]

Implements TSQLServer.

Definition at line 685 of file TODBCServer.cxx.

References CheckConnect, ExtractErrors(), fHdbc, and NULL.

Int_t TODBCServer::GetMaxIdentifierLength (  )  [virtual]

Reimplemented from TSQLServer.

Definition at line 709 of file TODBCServer.cxx.

References CheckConnect, ExtractErrors(), fHdbc, info, and NULL.

Int_t TODBCServer::CreateDataBase ( const char *  dbname  )  [virtual]

Implements TSQLServer.

Definition at line 726 of file TODBCServer.cxx.

References CheckConnect.

Int_t TODBCServer::DropDataBase ( const char *  dbname  )  [virtual]

Implements TSQLServer.

Definition at line 736 of file TODBCServer.cxx.

References CheckConnect.

Int_t TODBCServer::Reload (  )  [virtual]

Implements TSQLServer.

Definition at line 747 of file TODBCServer.cxx.

References CheckConnect.

Int_t TODBCServer::Shutdown (  )  [virtual]

Implements TSQLServer.

Definition at line 758 of file TODBCServer.cxx.

References CheckConnect.

const char * TODBCServer::ServerInfo (  )  [virtual]

Implements TSQLServer.

Definition at line 769 of file TODBCServer.cxx.

References CheckConnect, and fServerInfo.

Bool_t TODBCServer::StartTransaction (  )  [virtual]

Reimplemented from TSQLServer.

Definition at line 814 of file TODBCServer.cxx.

References CheckConnect, Commit(), ExtractErrors(), fHdbc, info, kFALSE, kTRUE, NULL, and TSQLServer::SetError().

Bool_t TODBCServer::Commit (  )  [virtual]

Reimplemented from TSQLServer.

Definition at line 860 of file TODBCServer.cxx.

References EndTransaction(), and kTRUE.

Referenced by StartTransaction().

Bool_t TODBCServer::Rollback (  )  [virtual]

Reimplemented from TSQLServer.

Definition at line 868 of file TODBCServer.cxx.

References EndTransaction(), and kFALSE.


Member Data Documentation

SQLHENV TODBCServer::fHenv [private]

Definition at line 35 of file TODBCServer.h.

Referenced by Close(), and ExtractErrors().

SQLHDBC TODBCServer::fHdbc [private]

Definition at line 36 of file TODBCServer.h.

Referenced by Close(), EndTransaction(), Exec(), ExtractErrors(), GetColumns(), GetMaxIdentifierLength(), GetTableInfo(), GetTables(), Query(), SelectDataBase(), StartTransaction(), and Statement().

TString TODBCServer::fServerInfo [private]

Definition at line 37 of file TODBCServer.h.

Referenced by ServerInfo().

TString TODBCServer::fUserId [private]

Definition at line 38 of file TODBCServer.h.


The documentation for this class was generated from the following files:
Generated on Tue Jul 5 16:43:35 2011 for ROOT_528-00b_version by  doxygen 1.5.1