非常诡异的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();
相关问答:
写了个测试程序如下
struct hostent *hp;
char AlarmDevIP[20];
int x2;
hp = gethostbyname("www.google.com");
if (hp)
{
......
在ubuntu上搭建了服务器,根目录为/var/www,使用php脚本在/var/www/html文件夹下生成了文件夹和文件,生成的格式是/var/www/html/123456/sss.html,生成后查看html文件夹的权限是www-data,我执行php的删除脚本的时 ......
有三个文件,w.h,w.cpp,m.cpp,其中m.cpp中有main函数,并且需要传递一个文件参数。
请教下,如何在linux环境下编译调试?
我对linux下的编译几乎完全不懂,可否详细解答下,谢谢了
up!!
up!!
g++
g ......
有谁能介绍一下,现在主流的linux有哪些版本。
小弟刚接触linux,现在装的是redhat3.2.2-5的版本,这个连samba都装不上,搞到很多错误,所以期盼各位给推荐个比较好的linux系统,主要用于初期学习和后期j2ee /php开 ......
我在Linux上装了Oracle数据库,其中有一个表,大约有90000条数据,用Oracle进行分页查询的时候,发现很慢
sql语句如下:
select *
from (select row_.*, rownum rownum_
from (select * ......