cursor with hold explain ?

Answer Posted / ratheesh nellikkal

Hi All,
Cursor is nothing but a pointer to a result set that you
get as a result of executing a query.
So if u wanna some operations using this cursor then u have
to
1. Declare a cursor
2.Open the cursot before the first access
3.Do the operations
4.Close the cursor.

But in case of a normal cursor (not declared with 'with
hold' option) in between the operations if u issued a
commit command then the cursor will be getting closed and
if u wanna access it again then u should open it again.

But incase of a 'With hold' cursor it will maintane the
states if you issed a commit also.
Means it will not get closed by applying frequent commit.

Regards,
Ratheesh Nellikkal

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the various data types available in db2?

841


What is the connection string to connect to the DB2 Database ?

894


Explain the contention situations caused by locks?

832


How is the value function used?

869


Hi Everyone... Under the Logical files, when am working on multiple rec format logical file, I have joined two pf's using the multiple record format logical file concept, but when i run queried the LF only the first mentioned pf records are reflecting and I am not able to see any of the field records specified under the second pf. Kindly let me know whats the reason behind this. Below is the str of LF., R rec PFILE(LOGICAA) CUSTNO CUSTNAME BILL K CUSTNO R rec1 PFILE(LOGICAA1) CUSTNO ADD K CUSTNO .....

2142


What is bind in db2?

816


What is ibm db2 connect?

782


What is check constraint. Explain with example.

881


What do you mean by rollback?

773


What is buffer pool in the db2 database?

884


What is the difference between using bind () and rebind () methods of naming class?

1118


When reorg is used?

892


What is node in db2?

837


What are the contents of a dclmgen?

874


What is bind plan?

832