20 mEnvironment = oracle::occi::Environment::createEnvironment (oracle::occi::Environment::OBJECT);
22 size_t ipass = fDb.find (
'/');
23 size_t ihost = fDb.find (
'@');
25 if (ipass == std::string::npos || ihost == std::string::npos) {
26 std::cerr <<
"DBInterface::DBInterface-> Error in connection std::string format: " << fDb
27 <<
" Expect user/password@db" << std::endl;
30 std::string
user (fDb, 0, ipass);
31 std::string pass (fDb, ipass+1, ihost-ipass-1);
32 std::string
host (fDb, ihost+1);
39 std::cerr <<
"DBInterface::DBInterface exception-> " << sqlExcp.getErrorCode () <<
": " << sqlExcp.what () << std::endl;
47 oracle::occi::Environment::terminateEnvironment (
mEnvironment);
oracle::occi::Statement * mStatement
oracle::occi::SQLException SQLException
DBInterface(const std::string &fDb, bool fVerbose=false)
oracle::occi::Connection * mConnect
oracle::occi::Environment * mEnvironment