10 using namespace oracle::occi;
24 ss <<
"//" <<
host <<
":" <<
port <<
"/" << sid;
26 env = Environment::createEnvironment(Environment::OBJECT);
27 conn =
env->createConnection(
user, pass, ss.str());
28 stmt = conn->createStatement();
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();
51 throw(std::runtime_error(
"ERROR: Connection Failed: " + e.getMessage() ));
64 conn->terminateStatement(stmt);
65 env->terminateConnection(conn);
66 Environment::terminateEnvironment(
env);
68 throw(std::runtime_error(
"ERROR: Destructor Failed: " + e.getMessage() ));
oracle::occi::SQLException SQLException
EcalDBConnection(std::string host, std::string sid, std::string user, std::string pass, int port=1521) noexcept(false)
volatile std::atomic< bool > shutdown_flag false
virtual ~EcalDBConnection() noexcept(false)