Bookmark mit SQLQuery funktioniert nicht wie erwartet:
Ich hatte erwartet wenn ich zB mit
Code: Alles auswählen
B := SQLQuery1.Bookmark;
Code: Alles auswählen
SQLQuery1.Bookmark := B;
Zur Veranschaulichung habe ich ein Demoprojekt angehängt. Dem Demoprojekt liegt auch die Beispieldb "employee.sql" bei.
Getestet mit:
- Lazarus 3.6 (rev lazarus_3_6) FPC 3.2.2 x86_64-linux-gtk2
- Lazarus 4.99 (rev main_4_99-1238-gad7e912a49) FPC 3.3.1 x86_64-linux-gtk2
- LI-V3.0.11.33637 Firebird 3.0
Die Doku meint
ich solle alsoTBookMark 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.
Code: Alles auswählen
Var
B : TBookmarkStr;
Code: Alles auswählen
Var
B : TBookmark;
verwenden was aber zur Fehlermeldung:
Code: Alles auswählen
unit1.pas(42,18) Error: Incompatible types: got "TBytes" expected "AnsiString"