12 #ifndef ROOT_TODBCServer
13 #define ROOT_TODBCServer
15 #ifndef ROOT_TSQLServer
20 typedef void * SQLHENV;
21 typedef void * SQLHDBC;
22 typedef short SQLRETURN;
47 TODBCServer(
const char* db,
const char *uid,
const char *pw);
Int_t SelectDataBase(const char *dbname)
Select a database.
static void PrintDrivers()
Print list of ODBC drivers in form: : ="">
static TList * ListData(Bool_t isdrivers)
Produce TList object with list of available ODBC drivers (isdrivers = kTRUE) or data sources (isdrive...
Bool_t EndTransaction(Bool_t commit)
Complete current transaction (commit = kTRUE) or rollback Switches on autocommit mode of ODBC driver...
TSQLResult * Query(const char *sql)
Execute SQL command.
TSQLTableInfo * GetTableInfo(const char *tablename)
Produces SQL table info Object must be deleted by user.
Bool_t Exec(const char *sql)
Executes query which does not produce any results set Return kTRUE if successfull.
void Close(Option_t *opt="")
Close connection to MySQL DB server.
#define ClassDef(name, id)
static TList * GetDataSources()
Produce TList object with list of available ODBC data sources User must delete TList object aftewards...
TList * GetTablesList(const char *wild=0)
Return list of tables in database See TSQLServer::GetTablesList() for details.
Bool_t ExtractErrors(SQLRETURN retcode, const char *method)
Extract errors, produced by last ODBC function call.
static TList * GetDrivers()
Produce TList object with list of available ODBC drivers User must delete TList object aftewards Name...
TSQLStatement * Statement(const char *sql, Int_t=100)
Creates ODBC statement for provided query.
Bool_t StartTransaction()
Starts transaction.
Int_t Shutdown()
Shutdown the database server.
TSQLResult * GetTables(const char *dbname, const char *wild=0)
List all tables in the specified database.
Int_t DropDataBase(const char *dbname)
Drop (i.e.
Bool_t Commit()
Commit transaction.
Int_t Reload()
Reload permission tables.
static void PrintDataSources()
Print list of ODBC data sources in form: : ="">
const char * ServerInfo()
Return server info.
TSQLResult * GetDataBases(const char *wild=0)
List all available databases.
virtual ~TODBCServer()
Close connection to MySQL DB server.
Bool_t Rollback()
Rollback transaction.
TODBCServer(const char *db, const char *uid, const char *pw)
Bool_t HasStatement() const
Int_t CreateDataBase(const char *dbname)
Create a database. Returns 0 if successful, non-zero otherwise.
TSQLResult * GetColumns(const char *dbname, const char *table, const char *wild=0)
List all columns in specified table in the specified database.
Int_t GetMaxIdentifierLength()
returns maximum allowed length of identifier (table name, column name, index name) ...