- 论坛徽章:
- 0
|
我写了一个OCCI的程序,该程序在linux下面运行一切正常,但是同样的代码到AIX下再编译运行就出问题了.而且一次提交数量的不同,报的错也不同.
AIX下调用executeArrayUpdate 产生 ORA-32129错误
数据缓存是这样声明的:
typedef char STD_FIELD_VALUE[FETCH_COUNT][MAX_FIELD_LEN];
#pragma pack(1)
typedef struct
{
unsigned int iRecRowNum; //有多少行记录
STD_FIELD_VALUE *pStdValueBuff;
}RECORD_DATA; |
数据库插入的方法:
void ExecuteArrayUpdate(string sSql,int iColNum,int iRowNum,RECORD_DATA *pFieldValue,ub2 (*pElemLen)[FETCH_COUNT])
throw(SQLException)
{
int iArray[FETCH_COUNT];
try
{
if(m_pStmt==NULL)
m_pStmt = m_pOcciConn->createStatement();
m_pStmt->setSQL(sSql);
for(int i=0;i<iColNum;i++)
{
m_pStmt->setDataBuffer(i+1,pFieldValue->pStdValueBuff[i],OCCI_SQLT_STR,
MAX_FIELD_LEN,pElemLen[i],(sb2*)NULL,(ub2*)NULL);
}
m_pStmt->executeArrayUpdate(iRowNum);
}
catch()......
} |
当把FETCH_COUNT宏设置成1时,ExecuteArrayUpdate抛出异常 ORA-32129: cannot get information about this column
当把FETCH_COUNT宏设置大于1时,ExecuteArrayUpdate抛出异常 ORA-32109: invalid column or parameter position.
[ 本帖最后由 jiangf 于 2009-10-12 09:55 编辑 ] |
|