[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'db' (#fcl)

# TDataSet.CompareBookmarks

Compare two bookmarks

## Declaration

Source position: db.pas line 1582

`public function TDataSet.CompareBookmarks(`
`Bookmark1: TBookmark;`
`Bookmark2: TBookmark`
`):LongInt; virtual;`

## Arguments

`Bookmark1` |  | First bookmark
`Bookmark2` |  | Second bookmark.

## Function result

result of the compare operation

## Description

CompareBookmarks can be used to compare the relative positions of 2 bookmarks. It returns a negative value if Bookmark1 is located before Bookmark2, zero if they refer to the same record, and a positive value if the second bookmark appears before the first bookmark. This function mustbe overridden by descendent classes of TDataset. The implementation in TDataset always returns zero.

## Errors

No checks are performed on the validity of the bookmarks.

## See also

TDataset.BookmarkValid |  | Test whether ABookMark is a valid bookmark.
TDataset.GetBookmark |  | Get a bookmark pointer (deprecated)
TDataset.SetBookmark

Documentation generated on: Feb 26 2014