10 using namespace oracle::occi;
18 ss <<
"//" <<
host <<
":" <<
port <<
"/" << sid;
20 env = Environment::createEnvironment(Environment::OBJECT);
22 stmt =
conn->createStatement();
23 }
catch (SQLException &
e) {
24 cout << ss.str() << endl;
25 throw(std::runtime_error(
"ERROR: Connection Failed: " + e.getMessage()));
37 env = Environment::createEnvironment(Environment::OBJECT);
39 stmt =
conn->createStatement();
40 }
catch (SQLException &e) {
41 throw(std::runtime_error(
"ERROR: Connection Failed: " + e.getMessage()));
53 conn->terminateStatement(stmt);
55 Environment::terminateEnvironment(
env);
56 }
catch (SQLException &e) {
57 throw(std::runtime_error(
"ERROR: Destructor Failed: " + e.getMessage()));
EcalDBConnection(std::string host, std::string sid, std::string user, std::string pass, int port=1521) noexcept(false)
virtual ~EcalDBConnection() noexcept(false)