Share via


xSession::lastUpdateConflictingTable Method

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

Syntax

client server public static Common lastUpdateConflictingTable()

Run On

Called

Return Value

Type: Common Table
An instance of the table that most recently had an update conflict.

Examples

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

See Also

xSession Class

xSession::currentRetryCount Method