Advanced PowerBuilder

HomePrevious Lesson: The FETCH Statement
Next Lesson: Scrollable Cursors

Cursors and Transaction Objects

The DECLARE statement uses a SQLCA Transaction Object. If you need to use a different Transaction Object, you have to add a USING <TransactObject_Name> clause at the end of the SELECT part of the DECLARE statement. For example:
DECLARE lProductMasterCursor1 CURSOR FOR 
SELECT product_no, product_description 
FROM product_master
USING TranObjForSQLServer ;

You can specify the Transaction Object name only in the DECLARE statement. There is no need to specify it in the OPEN, FETCH and CLOSE statements.
HomePrevious Lesson: The FETCH Statement
Next Lesson: Scrollable Cursors