非常诡异的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();
相关问答:
引用内容vsking 2009-12-25 22:56:52
现在是win2008和iis8的时代了,不要还停留在iis5时代,win2008被评为十佳操作系统之首不是偶然的,你要是..
我的问题是:
最近想买个服务器,看了dell上的系统定制选择,一些 ......
如题,在WINDOWS底下的CODE会,但在LINUX下不知道如何实现,JS的代码应该是不一样的。 求教。
分不够再加。
http://topic.csdn.net/u/20100113/08/17ba1e71-4c33-43f6-91a5-0e031c86e5ed.html
linux ......
最近想了解下内联汇编,想要用来操作下数组的时候遇到些困难。
我了解到的一些方法:
C/C++ code:
int main()
{
//这种方法可以单独操作数组中的一个
int a[10];
__asm__("movl $10, %0&quo ......
各位大虾,先问声好!
想请教一下在window下用putty怎么部署linux服务器上的SSH框架,数据库和tomcat都安装好了,jdk也装上去了,现在就是怎么在上面搭建SSH框架了!求各位不吝赐教!或者提供相应 ......
12:16:55,259 ERROR InterceptorBuilder:63 - Actual exception
Caught Exception while registering Interceptor class org.apache.struts2.interceptor.debugging.DebuggingInterceptor - interceptor - jar:file ......