24 ss <<
"//" <<
host <<
":" <<
port <<
"/" << sid;
26 env = Environment::createEnvironment(Environment::OBJECT);
27 conn =
env->createConnection(
user, pass, ss.str());
28 stmt = conn->createStatement();
29 }
catch (SQLException &
e) {
30 cout<< ss.str() << endl;
31 throw(std::runtime_error(
"ERROR: Connection Failed: " + e.getMessage() ));
47 env = Environment::createEnvironment(Environment::OBJECT);
48 conn =
env->createConnection(
user, pass, sid);
49 stmt = conn->createStatement();
50 }
catch (SQLException &e) {
51 throw(std::runtime_error(
"ERROR: Connection Failed: " + e.getMessage() ));
63 conn->terminateStatement(stmt);
64 env->terminateConnection(conn);
65 Environment::terminateEnvironment(
env);
66 }
catch (SQLException &e) {
67 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)