Visual Basic: RDO Data Control

LastModified Property (Remote Data)

See Also    Example    Applies To

Returns a bookmark indicating the most recently added or changed row.

Syntax

object**.LastModified**

The object placeholder represents an object expression that evaluates to an object in the Applies To list.

Return Values

The return value for this property is a Variant(string) data type, as described in Remarks.

Remarks

After you use the AddNew method to add a new row, or edit an existing row using the Update method, the LastModified property returns a bookmark as a pointer to the row most recently modified providing the keyset supports additions. That is, if new rows are added to the keyset as well as the underlying database table(s), the LastModified property will point to this new row in the keyset.

To position the current row pointer to this row, set the Bookmark property of the (same) rdoResultset object to the LastModified property.

If there have been no modifications against this rdoResultset, then the LastModified property returns 0.

Not all types of rdoResultsets support additions to their keysets so the LastModified property might return 0 after a row has just been added. For example, while a ODBC cursor static keyset can be updated, its rowset cannot be added to. Inserts are performed on the database, but not to the keyset, so the LastModified property always returns 0 in this case.

Server-side keyset cursors support additions to the keyset so the AddNew method sets the LastModified property as does the Update method.

Client-side static cursors do not add new rows to the cursor's membership, thus the LastModified property value is undefined when using the AddNew method. However, it is defined after the Update method is used. Server-side static cursors are read-only, so the LastModified property is not relevant in this case.

Dynamic and forward-only cursors do not support bookmarks (as indicated by the Bookmarkable property returning False), so the LastModified property is not relevant in these cursors.

The client batch cursor library also supports the LastModified property. For static cursors, new rows are added to the cursor membership so the AddNew method sets the LastModified property as does the Update method.