UnpackTombstoneKey Method

Converts the representation of a row key used in the tombstone table into the column values of the row key used in the specified table.

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

Syntax

'Declaration
Public Function UnpackTombstoneKey ( _
    tableName As String, _
    tombstoneKey As Byte() _
) As Object()
'Usage
Dim instance As SqlCeChangeTracking
Dim tableName As String
Dim tombstoneKey As Byte()
Dim returnValue As Object()

returnValue = instance.UnpackTombstoneKey(tableName, _
    tombstoneKey)
public Object[] UnpackTombstoneKey(
    string tableName,
    byte[] tombstoneKey
)
public:
array<Object^>^ UnpackTombstoneKey(
    String^ tableName, 
    array<unsigned char>^ tombstoneKey
)
member UnpackTombstoneKey : 
        tableName:string * 
        tombstoneKey:byte[] -> Object[] 
public function UnpackTombstoneKey(
    tableName : String, 
    tombstoneKey : byte[]
) : Object[]

Parameters

  • tombstoneKey
    Type: array<System. . :: . .Byte> [] () [] []
    An array of bytes that represents the value of the row key in the tombstone table.

Return Value

Type: array<System. . :: . .Object> [] () [] []
An array of objects that contains the column values of the row key used in the table.

Remarks

The row key uniquely identifies each row in a tracked table to the tracking system. The row key can either be the primary key of the table or a column of type uniqueidentifier that has the ROWGUIDCOL attribute applied (ROWGUID column). The type of row key used for a table is specified by passing one of the values of TrackingKeyType when tracking is enabled on the table.

The tombstone table (__sysOCSDeletedRows) uses a generic representation of this value stored in the __sysRK column. The __sysRK column uniquely identifies data in the tombstone table associated with a specific row of a specific tracked table.

In the case where the row key is a primary key that consists of a single column or where the row key is the ROWGUID column, the array returned by UnpackTombstoneKey will have a single element: the value of that column. However, in the case where the row key is a primary key that consists of multiple columns, the returned array will contain the values of each of the columns in the row that make up the primary key. The columns will be positioned in the array in the order in which they are defined in the primary key definition; that is, columns defined earlier in the primary key definition will have a lower index in the array than those defined after them.

See Also

Reference

SqlCeChangeTracking Class

SqlCeChangeTracking Members

System.Data.SqlServerCe Namespace

EnableTracking

TrackingKeyType