TTSAbortTransaction

Aborts explicit transactions (For cross-platform functionality, see Developing NLMs with Cross-Platform Functions ( NDK: NLM Development Concepts, Tools, and Functions) and call NWTTSAbortTransaction.)

Local Servers:blocking
Remote Servers:blocking
NetWare Server:3.x, 4.x, 5.x, 6.x
Platform:NLM
Service:Server-Based TTS

Syntax

  #include <\nlm\nit\nwtts.h>  
   
  int TTSAbortTransaction (void); 
  

Return Values

Decimal

Hex

Constant

0

(0x00)

ESUCCESS

253

(0xFD)

ERR_TTS_DISABLED

Transaction could not be ended because the Transaction Tracking System™ (TTS™) is disabled.

254

(0xFE)

ERR_TRANSACTION_ENDS_RECORDS_LOCKED

Transaction was ended abnormally, but records were left locked.

255

(0xFF)

ERR_NO_EXPLICIT_TRANSACTION_ACTIVE

Remarks

When this function returns, the transaction has been successfully backed out. When a transaction is backed out, any writes to the file are aborted, and the file is returned to the state it was in before the transaction began.

This function releases the following physical record locks:

  • Physical record locks generated by TTS when a write operation is performed on a nonlocked record
  • Physical record locks that are not yet released because of a file write

For explicit transactions, the transaction is backed out, and any locks being held are released.

If implicit transactions are enabled and the number of logical or physical records still locked by the application exceeds the threshold, this function returns a value of 0xFE. In this case, the transaction is backed out, and the server automatically starts a new implicit transaction.

See Also

TTSBeginTransaction, TTSEndTransaction, TTSIsAvailable, TTSTransactionStatus