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_trabort http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
      D_TRABORT

SUMMARY

   d_trabort()

DESCRIPTION

   This function aborts a database transaction. All database changes made
   between the call to d_trbegin and call to d_trabort are discarded and
   not written to the database. All read and write locks for all open
   databases are freed. Moreover, no keep locks are processed. Only exclusive-
   locked files remain locked after a d_trabort call.

   Function d_trabort is used in situations where, during a transaction and
   after some changes have been made, a user error, application-dependent
   condition (e.g not enough inventory items), or a db_VISTA error requires
   that the update be aborted.

CURRENCY CHANGES
   None

RETURN CODES
   -27   S_TRNOTACT     Transaction not active. There is no active transaction
                        to abort.

EXAMPLE

   d_trbegin("orderentry");
   ..    /* enter customer info */
   ..    /* enter order info */
   ..    /* check invetory */
   if (items_requested > items_ available)
      {
       d_trabort();
       .. /* inform user */
      }
    else
      {
       .. /* complete update */
       d_trend();
      }

See Also: d_trbegin d_trend

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