10.07.2015 Views

Programming Guide - Actian

Programming Guide - Actian

Programming Guide - Actian

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

How You Can Access a Database with Standard SQL StatementsUpdateInDBReplaces the object in the databaseDeleteFromDBRemoves the object from the databaseNote: None of the BitmapObject and StringObject methods should be issuedwith autocommit set to ON.The DataStream system class defines the following methods that access thedatabase:OpenOpens the query for SQLSelect and query objectsSetColsCloseSets up the Columns array for an SQLSelect objectCloses the query (only when the DataStream object was opened inQY_CURSOR or QY_DIRECT modes)NextRowRetrieves the next row of data (only when the DataStream object wasopened in QY_CURSOR or QY_DIRECT modes)The QueryObject system class, which is a subclass of DataStream, has thefollowing additional database access methods:DBInsertPlaces a new row into the databaseDBUpdateReplaces a specified row in the databaseDBDeleteRemoves a specified row from the databaseBecause they access the database directly, these methods participate intransactions. Not only can using one of these methods initiate a transaction,but the methods are affected also by commit or rollback statements. Becausethe transaction semantics are not handled directly by these methods, you mustwrite the transaction management code. For more information about handlingtransactions opened by system class methods, see How You Can ManageTransactions (see page 182).164 <strong>Programming</strong> <strong>Guide</strong>

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

Saved successfully!

Ooh no, something went wrong!