<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    Hello:<br>
    <br>
    Freepascal 3.2.0. Windows 7-32bits<br>
    <br>
    <pre><font face="monospace">TMyObject=class
  private
    fDset:TDataset;
    function GetBookmark:TBookmarkStr;
    ...
end;</font></pre>
    <pre><font face="monospace">
function TMyObject.GetBookmark:TBookmarkStr;
Begin
  result:=FDset.Bookmark;
end;</font></pre>
    I get this compiling error:<br>
    Incompatible types: got "TBytes" expected "AnsiString"<br>
    <br>
    Nevertheless, <font face="monospace"><i>TbookmarkStr</i></font>
    documentation example assigns <font face="monospace">bookmark</font>
    property to a <font face="monospace">TBookmarkStr</font> variable<br>
    <a class="moz-txt-link-freetext" href="https://www.freepascal.org/docs-html/fcl/db/tdataset.bookmark.html">https://www.freepascal.org/docs-html/fcl/db/tdataset.bookmark.html</a><br>
    <br>
    I have considered to convert the TBytes to AnsiString, but instead
    to doing a research about AnsiString internals, or creating a
    function that copies bytes in a loop, I supposed that there was
    already a function to do that. I found <font face="monospace">BytesOf</font><br>
    <a class="moz-txt-link-freetext" href="https://www.freepascal.org/docs-html/rtl/sysutils/bytesof.html">https://www.freepascal.org/docs-html/rtl/sysutils/bytesof.html</a><br>
    The abstract is  "Return the bytes in a string", when in fact,
    according with the text below,  it does the opposite, returns the
    string in an array of bytes.<br>
    <br>
    Is there any function that move the bytes to an AnsiString?<br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Saludos
Santiago A.</pre>
  </body>
</html>