The TDataSet class manages bookmarks to keep track of a given record of the dataset and let a program jump back to it. Technically bookmarks are pointers to internal data structures, but (for many versions) they were declared as if they were strings to take advantage of string reference counting: type
TBookmark = Pointer; TBookmarkStr = string;
The TBookmarkStr type was used as data type of the Bookmark property of the TDataset class. As I already mentioned in the section "Strings are... Strings" of Chapter 3, these definitions have been modified in Delphi 2009140: type
TBookmark = TBytes;
140 With the new deprecated directive now taking a description as parameter, I'm not really sure why this almost obsolete data type is simply commented as deprecated. Using the proper directive in the case described here, would have issued a very clear warning before the error message.
The data type of the Bookmark property of the TDataset class is now of type TBookmark, that is a (reference counted) array of Byte. This means that existing code that uses the Bookmark property is unlikely to compile any longer.
For example, if you have the following legal code from a past version of Delphi:
Was this article helpful?
What you need to know about… Project Management Made Easy! Project management consists of more than just a large building project and can encompass small projects as well. No matter what the size of your project, you need to have some sort of project management. How you manage your project has everything to do with its outcome.