occi批量操作数据库示例
#include "DBManager.h"
#include <cstring>
#include <cstdio>
using namespace std;
/*
表结构:
表名:PEOPLE
字段:ID(主键); NAME; BIRTHDAY
*/
int main()
{
try
{
// 连接数据库
DBManager db_opt; //为将occi原始语句封装后的数据库操作类对象
db_opt.Init_env();
db_opt.Init("orclkfbj","evoms_sel","evoms_seljcbj") ;
db_opt.Connect_db();
printf("database connect success!\n");
// 设置sql
db_opt.m_p_stmt = db_opt.m_p_conn->createStatement();
db_opt.m_p_stmt->setSQL("insert into PEOPLE (ID,NAME,BIRTHDAY) values (:1, 'hzhsan', to_date('21-02-2004 13:13:34'))");
// 批量插入数据
db_opt.m_p_stmt->