a cursor normally gets closed once we provide a commit . If
u try to close the same cursor with close cursor command
later after providing the commit will there be any sql-error.
Answers were Sorted based on User's Feedback
Answer / pavithra
when we try to close the cursor that is already closed, it
will return the SQL error code
-501 - cursor found in the fetch or close statement is not open.
please correct me if wrong
| Is This Answer Correct ? | 4 Yes | 3 No |
Answer / manasa
WHEN THE CURSOR IDENTIFIED IN A FETCH OR CLOSE STATEMENT IS
NOT OPEN,then we get -501 error.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / mehdee
- If you do COMMIT in your program, that means you have
UPDATE, INSERT or DELETE, which in this case you must
DECLARE CURSOR WITH HOLD, then it will not be closed after
COMMIT.
| Is This Answer Correct ? | 1 Yes | 2 No |
what is sql abend code -801,-802?
what is the use of cursors?
How do I delete a table in db2?
What is precompiler in db2?
Define check constraint.
What are union and union all?
what is differnece between DROP TABLE & DELETE TABLE .
How do you retrieve the data from a nullable column?
How would you move a tablespace (using STOGROUP) to a different DASD volume allocated to that tablespace?
What are bind parameters in db2?
Hi , I am posting some interview ques . what is the use of cursors ? what is the diff between select and cursor ? bith are used for data retrival .. rite?
What is the physical storage length of timestamp data type?