Precompilers and OCI (MOSC)

MOSC Banner

Problems when Bufer size > 32767

edited Feb 14, 2013 3:58AM in Precompilers and OCI (MOSC) 7 commentsAnswered ✓
I have the following C++ code.

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

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center