OCIStmtFetch2 no OCI_SUCCESS_WITH_INFORMATION in case of null values
745887Jan 12 2010 — edited Jan 13 2010Currently I'am working on a new implementation for database access to replace the old oci pre 7 calls. In the OCI (10) documenation the following is stated:
>
For output variables, indicator variables determine whether the value returned from Oracle is a NULL or a truncated value. In the case of a NULL fetch in an
OCIStmtFetch() call, or a truncation in an OCIStmtExecute() call, the OCI call returns OCI_SUCCESS_WITH_INFO. The output indicator variable is set.
Instead of OCIStmtFetch I use OCIStmtFetch2 as recommended and expects OCI_SUCCESS_WITH_INFO in case a record is fetched with null values.
A test program showed that OCI_SUCCESS is always returned, even if the indicator variable indicates correctly that the field was null.
Does anyone have any thoughts why this can happen?
compiler:
IBM XL C/C++ Enterprise Edition for AIX, V9.0
Version: 09.00.0000.0000
platform:
AIX ieda 3 5
oci version:
10.2.0.4