Skip to content
Snippets Groups Projects
Commit 8a384b1c authored by Rene Brun's avatar Rene Brun
Browse files

From sergey Linev:

TOracleServer::ServerInfo() is now implemented (thanks to Dennis Box)


git-svn-id: http://root.cern.ch/svn/root/trunk@16382 27541ba8-7e3a-0410-8455-c3a389f83636
parent 867ae7ac
No related branches found
No related tags found
No related merge requests found
// @(#)root/physics:$Name: $:$Id: TOracleServer.h,v 1.3 2006/05/22 08:55:30 brun Exp $
// @(#)root/physics:$Name: $:$Id: TOracleServer.h,v 1.4 2006/06/02 14:02:03 brun Exp $
// Author: Yan Liu and Shaowen Wang 23/11/04
/*************************************************************************
......@@ -34,6 +34,7 @@ class TOracleServer : public TSQLServer {
private:
Environment *fEnv; // environment of Oracle access
Connection *fConn; // connection to Oracle server
TString fInfo; // info string with Oracle version information
public:
TOracleServer(const char *db, const char *uid, const char *pw);
......
// @(#)root/oracle:$Name: $:$Id: TOracleServer.cxx,v 1.13 2006/06/25 18:43:24 brun Exp $
// @(#)root/oracle:$Name: $:$Id: TOracleServer.cxx,v 1.14 2006/09/05 13:37:08 brun Exp $
// Author: Yan Liu and Shaowen Wang 23/11/04
/*************************************************************************
......@@ -462,12 +462,26 @@ Int_t TOracleServer::Shutdown()
//______________________________________________________________________________
const char *TOracleServer::ServerInfo()
{
// Return server info.
// NOT IMPLEMENTED.
// Return Oracle server version info.
CheckConnect("ServerInfo", 0);
return "Oracle";
fInfo = "Oracle";
TSQLStatement* stmt = Statement("select * from v$version");
if (stmt!=0) {
stmt->EnableErrorOutput(kFALSE);
if (stmt->Process()) {
fInfo = "";
stmt->StoreResult();
while (stmt->NextResultRow()) {
if (fInfo.Length()>0) fInfo += "\n";
fInfo += stmt->GetString(0);
}
}
delete stmt;
}
return fInfo.Data();
}
//______________________________________________________________________________
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment