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(
std::string(
"ERROR: Connection Failed: ") + getOraMessage(&e)));
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(
std::string(
"ERROR: Connection Failed: ") + getOraMessage(&e)));
64 conn->terminateStatement(stmt);
65 env->terminateConnection(conn);
66 Environment::terminateEnvironment(
env);
67 }
catch (SQLException &e) {
68 throw(std::runtime_error(
std::string(
"ERROR: Destructor Failed: ") + getOraMessage(&e)));
EcalDBConnection(std::string host, std::string sid, std::string user, std::string pass, int port=1521) noexcept(false)
virtual ~EcalDBConnection() noexcept(false)