非常诡异的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();
相关问答:
在ubuntu上搭建了服务器,根目录为/var/www,使用php脚本在/var/www/html文件夹下生成了文件夹和文件,生成的格式是/var/www/html/123456/sss.html,生成后查看html文件夹的权限是www-data,我执行php的删除脚本的时 ......
每次man的时候都是英文版的, 不知道怎么apt-get中文版的man阿?
漫漫找
难找啊,不过英文的也挺好啊
同感啊。。。
可以直接看英文的,不懂的查字典
那英文的那个地址在哪儿阿
看看/usr/share/man 和 / ......
想开始学习Linux操作系统,不知道如何下手,请各位大虾指点迷津??
下载iso镜像,刻盘(或者选择硬盘安装),然后音乐播放器,bash,vi
这一套弄下来,你估计就成一个中手了。
先用虚拟机玩玩吧·· ......
有三个文件,w.h,w.cpp,m.cpp,其中m.cpp中有main函数,并且需要传递一个文件参数。
请教下,如何在linux环境下编译调试?
我对linux下的编译几乎完全不懂,可否详细解答下,谢谢了
up!!
up!!
g++
g ......
12:16:55,259 ERROR InterceptorBuilder:63 - Actual exception
Caught Exception while registering Interceptor class org.apache.struts2.interceptor.debugging.DebuggingInterceptor - interceptor - jar:file ......