ORA-39772: column array reset disallowed after OCI_CONTINUE or OCI_NEED_DATA
Cause: An attempt was made to reset a column array when a row conversion is still in progress.
Action: Complete the current row before reseting the column array. To ignore the current row when conversion returned OCI_NEED_DATA, set the current column flag to OCI_DIRPATH_COL_ERROR. This should be followed by a conversion, which will undo and ignore the row. The column array(s) can then be reset.
等
该错误表明在 OCI(Oracle Call Interface)应用程序中,当OCI程序执行OCI_CONTINUE或OCI_NEED_DATA之后,不允许清空列数组。
当执行OCI_CONTINUE或OCI_NEED_DATA之后,列数据的范围变量不能重置。此功能必须在执行OCIStmtExecute()或OCIStmtFetch()调用之前完成。
此错误通常会发生在OCI应用程序中的以下场景:
•在执行数据库查询之后,OCI代码重置了列数组
•在处理返回的数据之后,OCI代码尝试重置列数组
一旦发生这种情况,程序员需要遵循以下步骤来正确处理:
1.在正确设置列数组之后,执行OCIStmtExecute()或OCIStmtFetch()调用。
2.若需要,在执行OCIStmtExecute()或OCIStmtFetch()之后,重置列数组。
3.然后再次执行OCIStmtExecute()或OCIStmtFetch()以重新获取数据。
4.如果查询操作已完成,请调用OCIStmtClose()以释放游标和变量内存。