10.07.2015 Views

Programming Guide - Actian

Programming Guide - Actian

Programming Guide - Actian

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

How You Can Manage TransactionsTo close either transaction, either the main frame or the called frame mustissue a commit or rollback statement while working in the session associatedwith the transaction. If the application is terminated, OpenROAD automaticallycommits both transactions.How You Can Manage Transactions with Bitmaps, String Objects, Long ByteObjects, Long Vchar Objects, and Data StreamsThree methods are associated with the BitmapObject and StringObject systemclasses that interact directly with the database:• InsertIntoDB• UpdateInDB• DeleteFromDBTwo methods are associated with the LongByteObject and LongVCharObjectsystem classes that interact directly with the database:• FetchFromDB• UpdateInDBFour methods are defined by the DataStream system class:• Open• SetCols• Close• NextRowThree additional methods are defined for the QueryObject subclass:• DBInsert• DBUpdate• DBDeleteIf no transaction is open when one of these methods is executed, its executioninitiates a transaction. If a transaction is open, then the work performed by themethod becomes part of the transaction.Like any other work performed by a database statement, the work is notcommitted to the database until the transaction of which it is a part iscommitted. If the program issues a rollback statement, any work performed byone of these methods in the affected transaction is also undone.186 <strong>Programming</strong> <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!