View Single Post

   
  #2 (permalink)  
Old 02-26-2008, 06:39 PM
Douglas Doole
 
Posts: n/a
Default Re: Cursor with Hold

It depends on how your programs call each other.

If each program is a separate executable and your are invoking the
executable (say via the system() call) then you cannot do what you want
since DB2 manages connections on a per-process basis.

If the programs are linked into a single executable then you can do what you
want. If program A may do a COMMIT, then declare program B's with the WITH
HOLD option to keep the cursors open across transaction boundaries. Note
that if progam A does a ROLLBACK, then all cursors will be closed,
regardless of WITH HOLD.

Hope this helps.

--
__________________________________________________ ___________________
Doug Doole
DB2 Universal Database Development
IBM Toronto Lab

Visit the DB2 UDB and DB2 Connect Online Support site at:
http://www.ibm.com/software/data/db2...s2unix/support
Reply With Quote