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(); }