Problems when Bufer size > 32767
I have the following C++ code.
try
{
myOcciData->myStmt-> createStatement("BEGIN :v1 := myTest.Test(:v2, :v3); END;");
myOcciData->myStmt->registerOutParam(1, OCCIINT, sizeof (nrows));
myOcciData->myStmt->setString(2, Id);
myOcciData->myStmt->setMaxParamSize(3, bufSize);
myOcciData->myStmt->setDataBuffer(3, (void*)myBlob, OCCI_SQLT_LBI, (sb4)bufSize,
(ub2*)&l, (sb2*)&ind, (ub2*)&rc);
myOcciData->myStmt->executeQuery();
nrows = myOcciData->myStmt->getInt(1);
myOcciData->myStmt->terminateStatement(myOcciData->myStamt);
}It works fine calling the Stored Procedure when the buffer < 32767. If bufSize is grater than 32767 it doesn't work.
The behavior I've seen is that the rc from setDataBuffer is always 0, but the code never
int nrows;
sb2 ind = 0;
ub2 l =0;
ub2 rc = 0;
int offset = 1;
try
{
myOcciData->myStmt-> createStatement("BEGIN :v1 := myTest.Test(:v2, :v3); END;");
myOcciData->myStmt->registerOutParam(1, OCCIINT, sizeof (nrows));
myOcciData->myStmt->setString(2, Id);
myOcciData->myStmt->setMaxParamSize(3, bufSize);
myOcciData->myStmt->setDataBuffer(3, (void*)myBlob, OCCI_SQLT_LBI, (sb4)bufSize,
(ub2*)&l, (sb2*)&ind, (ub2*)&rc);
myOcciData->myStmt->executeQuery();
nrows = myOcciData->myStmt->getInt(1);
myOcciData->myStmt->terminateStatement(myOcciData->myStamt);
}It works fine calling the Stored Procedure when the buffer < 32767. If bufSize is grater than 32767 it doesn't work.
The behavior I've seen is that the rc from setDataBuffer is always 0, but the code never
0