uMain.pas(54,22) Error: Incompatible types: got "TBytes" expected "AnsiString"uMain.pas(59,32) Error: Incompatible type for arg no. 1: Got "AnsiString", expected "TBytes"
The documentation claims that TBookmark is deprecated in favour of TBookmarkStr, but, in the source, TBookmarkStr is the type which is marked deprecated.The fpc 2.6.2 documentation (see: http://www.freepascal.org/docs-html/fcl/db/tbookmark.html) says that TBookmark is depracated:QuoteTBookmarkBookmark type (deprecated)Further on the same page, you can read (bold by me):QuoteTBookMark is the type used by the TDataset.SetBookMark method. It is an opaque type, and should not be used any more, it is superseded by the TBookmarkStr type. However, the source of db unit (fpc 2.6.2) claims quite opposite:Code: [Select] TBookmark = Pointer; TBookmarkStr = string deprecated 'TBookmarkStr will disappear in 2.6.3 in favour of TBookmark'; What is the actual status of these two types? Which one should be used?
TBookmarkBookmark type (deprecated)
TBookMark is the type used by the TDataset.SetBookMark method. It is an opaque type, and should not be used any more, it is superseded by the TBookmarkStr type.
TBookmark = Pointer; TBookmarkStr = string deprecated 'TBookmarkStr will disappear in 2.6.3 in favour of TBookmark';
TBookmark will stay for sure since it is D2009+ compatible.Afaik this situation reflects the confusing situation with Delphi where first they steered people towards bookmarkstr (since string and thus managed), but that bit them when they changed the definition of the stringtype, and Embarcadero changed TBookmark to array of byte so that it was also autocleaned.Currently, FPC 2.6.x leans towards bookmarkstr (older Delphis) and 2.7.x (more D2009+ like) will do both.