Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- db_VISTA III - d_trend http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
      D_TREND

SUMMARY

   d_trend()

DESCRIPTION

   This function ends a database transaction. by writting to the database all
   changes made since the most recent call to d_trbegin. The changes are first
   written to user log file in order to support auto recovery and then
   written to the database. The process in which the changes are written to
   database is called transaction commit.

   All locked files for all open databases are freed by d_trend except
   exclusive-locked files, which remain exclusive-locked, and keep-locked
   files, which will remain read-locked after the d_trend call.

--------------------------------------------------------------------------
Note:
   A technique which is useful in dealing which ststus S_NOSPACE is to store
   on the disk a "threshold"  file of some reasonable size, the contents of
   which are immaterial. Then, when d_trend returns S_NOSPACE, simply delete
   (unlink) the theshold file and reissure the call to d_trend. db_VISTA will
   reprwcess and complete the transaction, assuming of course there is now
   enought disk space available (see sxample below).
--------------------------------------------------------------------------

CURRENCY CHANGES
   None

RETURN CODES

   -27   S_TRNOTACT      Transaction not active, There is no active
                         transaction to end.

  -900   S_NOSPACE       No more space on file (disk).

EXAMPLE

   d_trbegin("orderentry");
   ..    /* enter order info */
   if ( d_trend() == NO_SPACE )
      {
       unlink("thrshold.sav");
       .. /* inform user that disk space is low */

See Also: d_trabort d_trbegin

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson