Share via


GetLastCommittedCsn Method

Returns the Commit Sequence Number (CSN) of the last transaction committed for the data source associated with the SqlCeChangeTracking object.

Namespace:  System.Data.SqlServerCe
Assembly:  System.Data.SqlServerCe (in System.Data.SqlServerCe.dll)

Syntax

'Declaration
Public Function GetLastCommittedCsn As Long
'Usage
Dim instance As SqlCeChangeTracking
Dim returnValue As Long

returnValue = instance.GetLastCommittedCsn()
public long GetLastCommittedCsn()
public:
long long GetLastCommittedCsn()
member GetLastCommittedCsn : unit -> int64 
public function GetLastCommittedCsn() : long

Return Value

Type: System. . :: . .Int64
The CSN for the data source.

Remarks

Each database maintains a monotonically incrementing counter that is used to denote the order in which each transaction for which the database is enlisted commits. This value, the Commit Sequence Number (CSN), is assigned to each transaction at commit time, and is then incremented. The GetLastCommittedCsn method returns the CSN assigned to the last transaction that committed.

See Also

Reference

SqlCeChangeTracking Class

SqlCeChangeTracking Members

System.Data.SqlServerCe Namespace