xSession.lastUpdateConflictingTable Method

Definition

Retrieves an instance of the table that most recently had an update conflict.

public:
 static int lastUpdateConflictingTable();
public static int lastUpdateConflictingTable ();
static member lastUpdateConflictingTable : unit -> int
Public Shared Function lastUpdateConflictingTable () As Integer

Returns

An instance of the table that most recently had an update conflict.

Remarks

The following example demonstrates the general use of the lastUpdateConflictingTable method. It enables you to abort or retry transactions according to which table has an update conflict.

try 
{ 
    // ... 
    table1.update(); 
    // ... 
    table2.update(); 
} 
catch(Exception::UpdateConflict) 
{ 
    if(xSession::lastUpdateConflictingTable() == table1) 
    { 
        ttsabort; 
    } 
    else if(xSession::lastUpdateConflictingTable() == table2) 
    { 
        // Compensate here. 
        // ... 
        retry; 
    } 
}

Applies to