[英]Using UPDATE in Oracle DB OCCI interface
I use oracle occi api to update data, code:我使用 oracle occi api 来更新数据,代码:
Environment * env = Environment::createEnvironment();
Connection * con = env->createConnection("nm_web","nm_web99","192.168.26.42/orcl");
Statement *stmt;
string sqlStmt =
"update tb_yctp_daq_record set deal_status=1";
try{
stmt = con->createStatement(sqlStmt);
stmt->execute();
}catch(SQLException ex)
{
cout<<"Exception thrown for updateRow"<<endl;
cout<<"Error number: "<< ex.getErrorCode() << endl;
cout<<ex.getMessage() << endl;
}
con->commit();
con->terminateStatement (stmt);
Environment::terminateEnvironment(env);
return true;
but this code stuck in " stmt = con->createStatement(sqlStmt);"但是这段代码卡在“stmt = con->createStatement(sqlStmt);”中
I just not commit update operation in PLSQL tools, this could lead lock this table.我只是没有在 PLSQL 工具中提交更新操作,这可能导致锁定此表。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.