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



a cursor normally gets closed once we provide a commit . If u try to close the same cursor with cl..

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

a cursor normally gets closed once we provide a commit . If u try to close the same cursor with cl..

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

a cursor normally gets closed once we provide a commit . If u try to close the same cursor with cl..

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

Post New Answer

More DB2 Interview Questions

What is dbrm? When it will be created?

0 Answers  


How we create a tables in DB2 ?Previously client has using 7 letters for user id,now he wants to increase the letters from 7 to 12 for user id.How we can do it?

6 Answers   Wipro,


Write a query to extract first 5 characters of a name in the column Stud_Name?

1 Answers   RBS,


Consider that a package is bound into 2 different collections and the PKLIST option specifies both the collections. If the collection id is not specified in the program while executing the SQL query, then when the DB2 system will search the package list, which collection will it pick up or will it give an error/abend?

1 Answers  


What is tablespace?

3 Answers  






What is the physical storage length of date data type?

0 Answers  


What is ibm db2 connect?

0 Answers  


Where besides the DB2 catalog is database object information stored by DB2?

1 Answers  


Name the lockable units in DB2?

0 Answers  


How do run the JCL which has 25 steps by skipping the following steps 5, 10,15 and 25 without using COND statement

5 Answers   Syntel,


Can any one tell me about Restart logic in DB2.

2 Answers  


Which component is responsible for processing sql statements and selecting access paths?

0 Answers  


Categories