NWTTSEndTransaction

Ends an explicit transaction and returns a transaction reference number

Local Servers:blocking
Remote Servers:blocking
NetWare Server:3.11, 3.12, 3.2, 4.x, 5.x, 6.x
Platform:NLM, Windows NT, Windows 95, Windows 98
Library:Cross-Platform NetWare Calls (CAL*.*)
Service:Transaction Tracking System (TTS)

Syntax

  #include <nwtts.h> 
  or 
  #include <nwcalls.h> 
   
  NWCCODE N_API  NWTTSEndTransaction  ( 
     NWCONN_HANDLE   conn,  
     pnuint32        transactionNum); 
  

Delphi Syntax

  uses calwin32 
   
  Function NWTTSEndTransaction 
    (conn : NWCONN_HANDLE; 
     transactionNum : pnuint32 
  ) : NWCCODE; 
  

Parameters

conn
(IN) Specifies the NetWare server connection handle.
transactionNum
(OUT) Points to the transaction reference number for the transaction being ended (optional).

Return Values

These are common return values; see Return Values (Return Values for C) for more information.

0x0000

Successful

0x8801

INVALID_CONNECTION

0x890A

NLM_INVALID_CONNECTION

0x89FE

Transaction Restart

0x89FF

LOCK_ERROR

Remarks

The transaction number is used to verify a successful transaction completion to disk.

The transaction is not necessarily written to disk when the reference number is returned. A client must call NWTTSTransactionStatus to verify a transaction has been written to disk. If the NetWare server fails before all updates contained within the transaction have been written to disk, the transaction is backed out when the NetWare server is rebooted.

If transaction tracking is disabled, transactionNum can still determine when the transaction has been completely written to disk. Since transactionNum is optional, substitute NULL if no return values are desired.

NWTTSEndTransaction releases all physical record locks generated by the NetWare server when a Write is made to an unlocked record. In addition, physical or logical locks that were not released due to a file Write are unlocked at this time.

0x89FE indicates more than the threshold number of logical or physical records are still locked by the application. However, the transaction is finished and any locks being held are released. In this case, the NetWare server automatically starts a new implicit transaction.

NCP Calls

See Also

NWTTSAbortTransaction, NWTTSBeginTransaction, NWTTSTransactionStatus