Exception "EZDatabaseError: Bookmark was not found" only when deleting the first record.

The official tester's forum for ZeosLib 7.1. Ask for help, post proposals or solutions.
Hans Brenkman
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: 12.04.2016, 21:37

Exception "EZDatabaseError: Bookmark was not found" only when deleting the first record.

Postby Hans Brenkman » 13.04.2016, 09:45

Situation : Delphi 2010, Zeos 7.1.4, TZQuery -> TDataSetProvider -> TClientDataSet -> TDataSource -> TDBGrid.

I have a simple table (with < 10 records) on which I do a select:

Code: Select all

SELECT ID, OMSCHRIJVING FROM LOCATIES ORDER BY OMSCHRIJVING


When I delete the first record (not the first record in the table but the first record in the DBGrid which became the first because of the "ORDER BY" clause), I get the exception "EZDatabaseError: Bookmark was not found" (unit ZAbstractRODataset.pas procedure TZAbstractRODataset.InternalGotoBookmark(Bookmark: Pointer) line 2242). The record has been deleted.

Without the "ORDER BY" clause but with the field "OMSCHRIJVING" in the property SortedFields of TZQuery gives the same exception. Also a seperate TZUpdateSQL object connected with the TZQuery with generated SQL gives the same exception.

A record other than the first one is no problem. If I retrieve the records from the table without the "ORDER BY" clause it is also no problem. Also when I make a index in the ClientDataSet.

I've searched the forum an read some issues with the same exception and should be solved.

http://zeoslib.sourceforge.net/viewtopic.php?f=33&t=3170&hilit=bookmark
http://zeoslib.sourceforge.net/viewtopic.php?f=33&t=3468&hilit=BOOKMARK
http://zeoslib.sourceforge.net/viewtopic.php?f=36&t=3082&hilit=BOOKMARK
http://zeoslib.sourceforge.net/viewtopic.php?f=38&t=3661&p=18881&hilit=bookmark+was#p18881

In the unit ZAbstractDataset.pas indeed the code is fixed, but not in ZAbstractRODataset.pas.

The exception comes from the unit ZAbstractRODataset.pas as if I used a read-only query (TZReadOnlyQuery) but that isn't the case. I know for sure I use a TZQuery.

I get the same exception on another tables with the "ORDER BY" clause.

Has anyone the same problem c.q. a solution other than no "ORDER BY" and a index in the ClientDataSet ?

Return to “ZeosLib 7.1 stable Forum”

Who is online

Users browsing this forum: Baidu [Spider] and 1 guest