|
BufferUpdates() 
Corporate Edition Only
Buffer all record additions to the database until
BufferCommit() or
BufferRollback() is called.
Syntax
BufferUpdates()
Arguments
None.
Returns
None.
Description
The purpose of this function is to allow for the
grouping of a series of record changes and/or updates as a single
'transaction set' that will only be committed to the database when
successfully completed. In this way it can be ensured that
incomplete data is not written to the CAPITAL database in the event
that the application executing the script is interrupted and fails
to complete it's programmed task.
Once this function is called, all additions such
as new records created, and changes to database records, are
buffered in a transaction log. Users sharing the same tables will
not see database changes until the buffered set of record changes
is committed. When the buffered record changes are committed, the
changes are written to the CAPITAL database.
When using the BufferUpdates() function it is
important from a coding design perspective to secure any necessary
table file-wide or record-wide locks that may be needed, before
calling this function.
After calling BufferUpdates() the only changes that
should be made to the database should consist of the adding of
records and changes to record fields. Tables should not be closed
until buffering is completed. Do not unlock any records, or close
any tables, until either
BufferCommit()
or
BufferRollback() is called.
It is also strongly advised that complex CBS
functions that perform internal database actions NOT be called
after executing BufferUpdates(). This is because complex CBS
functions may open and close additional tables and perform various
internal lock and unlock events.
|
While this function may be called from any
edition of CAPITAL, it has no effect other than when running under
the Corporate
Edition.
|
|
You may not call BufferUpdates() again once
it has been called until you call either
BufferCommit() or
BufferRollBack(). Either function MUST
be called before ending your script, or before calling
BufferUpdates() again.
|
Examples
BufferUpdates()
____________________________
Related Topics
BufferCommit()
BufferRollBack()
Business
Function List
|