12 #ifndef ROOT_TODBCServer
13 #define ROOT_TODBCServer
18 typedef void * SQLHENV;
19 typedef void * SQLHDBC;
20 typedef short SQLRETURN;
30 class TODBCServer :
public TSQLServer {
38 Bool_t ExtractErrors(SQLRETURN retcode,
const char* method);
40 Bool_t EndTransaction(Bool_t commit);
42 static TList* ListData(Bool_t isdrivers);
45 TODBCServer(
const char* db,
const char *uid,
const char *pw);
46 virtual ~TODBCServer();
48 static TList* GetDrivers();
49 static void PrintDrivers();
50 static TList* GetDataSources();
51 static void PrintDataSources();
53 void Close(Option_t *opt=
"");
54 TSQLResult *Query(
const char *sql);
55 Bool_t Exec(
const char* sql);
56 TSQLStatement *Statement(
const char *sql, Int_t = 100);
57 Bool_t HasStatement()
const {
return kTRUE; }
58 Int_t SelectDataBase(
const char *dbname);
59 TSQLResult *GetDataBases(
const char *wild = 0);
60 TSQLResult *GetTables(
const char *dbname,
const char *wild = 0);
61 TList *GetTablesList(
const char* wild = 0);
62 TSQLTableInfo* GetTableInfo(
const char* tablename);
63 TSQLResult *GetColumns(
const char *dbname,
const char *table,
const char *wild = 0);
64 Int_t GetMaxIdentifierLength();
65 Int_t CreateDataBase(
const char *dbname);
66 Int_t DropDataBase(
const char *dbname);
69 const char *ServerInfo();
71 Bool_t StartTransaction();
75 ClassDef(TODBCServer,0)