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 Access a Database with DataStream ObjectsThe relevant DataStream methods are:OpenOpens the query in the specified modeFetchRow(Valid only for cache mode.) Moves to a specified row in the cache andputs its data into internal buffersNextRowRetrieves the next row of data from the cache into internal buffersPrevRowLoadClose(Valid only for cache mode.) Backs up to the previous row in the cachedsequence, positioning that row to be loaded into fields or variablesMoves one row of data from internal buffers into target variables, objects,or fields on the formCloses the queryIn addition to using methods defined for the DataStream system class, using aquery object for database inserts, updates, and deletions requires methodsdefined for the QueryObject system class. These methods are:CommitToCacheKeeps data in the cache consistent with data in the database when insert,update, or delete operations are performed on cached dataDBDeletePerforms deletions on database tables with columns mapped to variablesor fields specified for deletionDBInsertPerforms insertions on database tables with columns mapped to variablesor fields specified for insertionDBUpdatePerforms updates on database tables with columns mapped to variables orfields specified for updateWhen running in cache mode, the cached data set is frozen to the state of thedata at the time the query was executed. If you make changes to the data inthe database tables, you must also update the cache to keep datasynchronized. To update the cache after changing data in the database, usethe CommitToCache method.180 <strong>Programming</strong> <strong>Guide</strong>

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

Saved successfully!

Ooh no, something went wrong!