OCCI 中文编程指南(16)
发布时间:2021-06-08
发布时间:2021-06-08
if (i!=1) m_stmt->addIteration(); }
cout<<"getMaxIterations = "<<m_stmt->getMaxIterations()<<endl; cout<<"set success"<<endl; inum = m_stmt->executeUpdate(); m_conn->commit(); cout << "INSERT ¨D¨D SUCCESS" << endl; } catch (SQLException ex) { inum = m_stmt->getUpdateCount(); cout << "ON" << inum+1 << " shi fail !" << endl; cout << " INSERT Error Number : "<< ex.getErrorCode() << endl; cout << ex.getMessage() << endl; m_conn->rollback(); return 0; }
conn->terminateStatement(stmt); env->terminateConnection(conn);
Environment::terminateEnvironment(env);
cout << "PROGRAM IS END ." << endl; return 1; }
5.4. 查询语句中批量取数
在批量取数时,使用setDataBuffer()方法来设置接收数据缓冲区大小,例子如下所示: #include <iostream> #include <occi.h>
using namespace oracle::occi; using namespace std;
int main () {
Environment *env; Connection *conn; Statement *stmt; ResultSet *rs;
string username = "bill";
上一篇:地理信息系统(gis)英语论文
下一篇:初中中学共青团团队工作计划,方案