Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> OCI Problem
Hello,
I am trying to retrieve data from a LONG RAW column by using the piecewise
feature of Oracle.
I use the statements in the following sequence
OCIDefinePos(...)
OCIStmtExecute(...)
status = OCIStmtFetch(...)
if(status == OCI_NEED_DATA)
{
OCIStmtGetPieceInfo(...)
OCIStmtSetPieceInfo(...)
}
Then I again do OCIStmtExecute(...) until I get OCI_SUCCESS or any other error.
I have set the MAX_DATASISE to 256 bytes. The data is quite more than 256, but everytime in the loop, OCIStmtGetPieceInfo() call returns me pieceinfo=OCI_ONE_PIECE instead of OCI_FIRST_PIECE. So I am unable to get the full data.
Can I get some help in this ?
I don't understand how OCI knows the size of chunk I am fetching. We do this in the SetPieceInfo stmt. But that is executed after the GetPieceInfo. Although I have given the chunk size in the DefineByPos stmt, but the documentation says that for OCI_DYNAMIC_FETCH mode this parameter is ignored. Received on Wed Oct 25 2000 - 03:54:11 CDT