xSession.lastUpdateConflictingTable Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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;
}
}