HomeDB2DB2 Error Code – +231 current position of cursor cursor-name is not valid for the specified fetch orientation of the current row or rowset

DB2 Error Code – +231 current position of cursor cursor-name is not valid for the specified fetch orientation of the current row or rowset

In this post, you’ll learn about the error message +231 current position of cursor cursor-name is not valid for the specified fetch orientation of the current row or rowset in the IBM DB2 database , the reason why it occurs along with the solution to fix it

IBM DB2 Error Message

+231 current position of cursor cursor-name is not valid for the specified fetch orientation of the current row or rowset

Reason for the Error

The� cursor was not positioned on a row or rowset, and one of the following fetch orientations specified that the cursor was to be positioned relative to its current position:
1. CURRENT or CURRENT ROWSET
2. RELATIVE 0 or ROWSET STARTING AT RELATIVE 0

Solution

Correct the application program to establish a valid cursor position before issuing this FETCH statement. Be certain to FETCH to position on a row after opening a cursor. If cursor is declared SENSITIVE STATIC SCROLL, the row may be a hole, from which no values can be fetched.

Share:

Leave a Reply

You May Also Like

In this post, you’ll learn about the error message -952 processing was interrupted by a cancel request from a client...
  • DB2
  • November 21, 2022
In this post, you’ll learn about the error message -927 the langrage interface was called when the connecting environment was...
  • DB2
  • November 21, 2022
In this post, you’ll learn about the error message -926 rollback not valid in ims/vs or cics environment in the...
  • DB2
  • November 21, 2022