| Application Mode > Application Mode Bookmarks |
In application mode, a bookmark is a variant supplied by your application and used by the list as a means of uniquely identifying a row of data to be displayed or modified.
Just as your application provides, stores, and maintains the data for the unbound list, you must deal similarly with the bookmarks. The bookmarks themselves must be supplied by your code in the UnboundGetRelativeBookmark and ClassicRead events as variant data. You are free to use whatever you choose for the purpose of identifying a row, but keep in mind that the bookmarks must be unique for each row. In general, you will also want to be able to search for the associated record quickly when given a bookmark. Three common examples of what to use for bookmarks are:
1. If you use the unbound list with a proprietary database, you can use the values of a unique key field as bookmarks. That way, when given a bookmark, you can search and retrieve the associated record quickly.
2. If the database you use supports unique row IDs or record numbers, these can be conveniently used as bookmarks.
3. If you use the list to display an array, the array's row index is an obvious choice for bookmarks.
Bookmarks cannot exceed 255 characters in length. Since Visual Basic 5.0 uses 2 bytes per character, this means that string bookmarks cannot exceed 127 characters.
True DBList's application mode supports string, integral, and floating point bookmarks. All other data types must be converted to strings before they are passed to the list as variant bookmarks.
Since True DBList and Visual Basic differ in their treatment of bookmarks, some restrictions apply when manipulating them in code, as discussed in the following sections.