易截截图软件、单文件、免安装、纯绿色、仅160KB

非常诡异的OCCI问题,linux下OK,AIX下格屁

我写了一个OCCI的程序,该程序在linux下面运行一切正常,但是同样的代码到AIX下再编译运行就出问题了.而且一次提交数量的不同,报的错也不同.
C/C++ code:
#include <iostream>
#include <occi.h>
using namespace std;
using namespace oracle::occi;

#define ARRAY_SIZE 10

int main()
{
Environment *pEnv = NULL;
Connection *pCon = NULL;
Statement *pStmt = NULL;
try
{
pEnv = Environment::createEnvironment ((Environment::Mode)(Environment::OBJECT|Environment::THREADED_UNMUTEXED));
pCon = pEnv->createConnection("xxxx", "xxxxx", "xxxxxxxx");
pStmt = pCon->createStatement("insert into table(code) values (:1);");
}
catch(SQLException &ex)
{
cout<<"Error number: "<< ex.getErrorCode() << endl;
cout<<ex.getMessage() << endl;
return -1;
}


int pServID[ARRAY_SIZE];
ub2 pLen[ARRAY_SIZE];

for(int i = 0; i < ARRAY_SIZE; ++i)
{
pServID[i] =i*2;
pLen[i] = sizeof(pServID[i]);
}


try
{
pStmt->setDataBuffer(1,pServID, OCCIINT, sizeof(int), pLen,(sb2*)NULL,(ub2*)NULL);
//ORA-32109: invalid column or parameter position
pStmt->executeArrayUpdate(ARRAY_SIZE);
pCon->commit();


相关问答:

linux 权限设置的问题 - Web 开发 / Apache

在ubuntu上搭建了服务器,根目录为/var/www,使用php脚本在/var/www/html文件夹下生成了文件夹和文件,生成的格式是/var/www/html/123456/sss.html,生成后查看html文件夹的权限是www-data,我执行php的删除脚本的时 ......

linux 下的SSH问题! - Web 开发 / 应用服务器

各位大虾,先问声好!
  想请教一下在window下用putty怎么部署linux服务器上的SSH框架,数据库和tomcat都安装好了,jdk也装上去了,现在就是怎么在上面搭建SSH框架了!求各位不吝赐教!或者提供相应 ......

S2在linux下面运行的问题,高手请进 - Java / Java EE

12:16:55,259 ERROR InterceptorBuilder:63 - Actual exception
Caught Exception while registering Interceptor class org.apache.struts2.interceptor.debugging.DebuggingInterceptor - interceptor - jar:file ......

迷茫在windows和Linux下开发 - VC/MFC / 非技术类

我学了2年的windows开发,主要是SDK,MFC,马上学COM;但是觉得windows下各种技术更新很快,每隔一段时间就要学习新的技术,在赶潮流上花费了太多时间,而我更喜欢研究的事算法,数据结构;
我现在正犹豫是不是要转L ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号