非常诡异的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系统下配置java开发环境比如Eclipse的安装、jdk的环境变量的配置、tomcat配置、mysql配置等我该怎么将这些文件拷贝到linux系统下呢,我的linux是在虚拟机中安装的。请教高手了,谢谢!
用第三方提供的支 ......
Linux下做2个线程,一个每隔0.5s显示,另一个每隔0.8s显示出来
1个C下放2个线程
谁会做的,速度~~~~
使用select就OK了
pthread_create 创建线程
timer 整个定时器
还是不太明白,有完整的过 ......
在ubuntu下可以很方便的使用man查看C函数的原型返回值什么的
但有一些关键字,比如time,clock,在使用man的时候就会进入shell关键字的帮助
请问如何在man time(或者其他和shell关键字有冲突的时候)使用C函数的帮 ......
12:16:55,259 ERROR InterceptorBuilder:63 - Actual exception
Caught Exception while registering Interceptor class org.apache.struts2.interceptor.debugging.DebuggingInterceptor - interceptor - jar:file ......