Page 1 of 1
GotoBookmark Error
Posted: 08.12.2009, 18:22
by hsk
I dont know if this is the right place, but...
I tried to use the component JvDBTreeview of the Jedi Library (is simple to implement), and I got the exception below:
Code: Select all
procedure TZAbstractRODataset.InternalGotoBookmark(Bookmark: Pointer);
var
Index: Integer;
begin
Index := CurrentRows.IndexOf(Bookmark);
if Index < 0 then
[bcolor=#FF0000]raise EZDatabaseError.Create(SBookmarkWasNotFound);[/bcolor]
if Index < CurrentRow then
CheckBiDirectional;
CurrentRow := Index + 1;
end;
and I made a simple example that only save and restore the bookmark and I got the same error informing wich the "Bookmark was not found"
Code: Select all
var
BK: TBookmark;
begin
zquery1.Open;
BK := zquery1.GetBookmark;
zquery1.GotoBookmark(BK);
end;
So... do I need make something more or is there a problem on Bookmark issue?
I´m use D2009 and ZeosLib7
Posted: 09.12.2009, 13:02
by papelhigienico
What's is your db server? What's is your revision?
Posted: 10.12.2009, 13:51
by hsk
papelhigienico wrote:What's is your db server? What's is your revision?
Sorry, I forgot this info.
I´m using MySQL5.1 and SVN740
Posted: 11.12.2009, 12:17
by papelhigienico
Hum... rev 740 have some changes that I do.
Posted: 11.12.2009, 21:14
by mdaems
See bug report 204
Posted: 12.12.2009, 14:02
by papelhigienico
hsk... Can you try test a small change that I do in ZAbstractRODataset?
If you will test it, replace the file and rebuild ZeosLib.
Posted: 14.12.2009, 13:10
by papelhigienico
And report the results here!
Posted: 17.12.2009, 12:30
by trupka
Hi!
Just tested svn rev 742 with Delphi 7/2007 and it works fine.
Posted: 20.12.2009, 01:40
by hsk
Sorry, I was traveling...
But I did the update to SVN744 and It´s working now =)
thx for all
Posted: 22.03.2010, 12:45
by chentishler
It seems that there are bugs with GetBookmark and GotoBookmark,
I am working with FB 2.0
When I use GetBookmarkStr, it works fine, I suspect that since in Delphi 2009 the bookmarks work with TBytes there are problems with the copy constructor of it.
Any advise of fixes?
Posted: 05.04.2010, 22:41
by seawolf
Hi, I did a test with FB 2.1.3, D2010 and the procedure posted at the begin, but I have no problems. So I suppose you encounter problems with Bookmark. Can you provide a piece of code where Bookmark raise an error?
Thank you
Posted: 06.04.2010, 08:41
by chentishler
Hi, I am just using now GetBookmarkStr instead of GetBookmark and it works fine. I suspect that because the implementation of TBookmark is now TBytes and not just a pointer, there are problems with assignment statements of it. I think that the data that is assigned by Zeos GetBookmark is not valid after the function returns.
Posted: 13.04.2010, 22:59
by mdaems
chentishler,
You're right the TBytes stuff has really caused us nightmares (also take into account we also support FPC 64 bit where pointers take 8 bytes instead of 4).
Last changes affecting bookmarks were in rev 781 (testing branch) or 785 (Trunk). Is your version more recent than those?
Mark
Posted: 14.04.2010, 12:09
by chentishler
Hi Mark,
I am not sure which rev, I downloaded it on 10th Sep, 2009
Can I see the rev in the files?
I still could not understand why the TBytes caused the problem, because according to my understanding the code is correct. Any idea?
Regards,
Chen
Posted: 14.04.2010, 21:45
by mdaems
No, but the changes/fixes I'm talking about date from february 2010, so they are certainly not included in your version.
Please try downloading the last snapshots from
http://zeosdownloads.firmos.at/downloads/snapshots/
As I didn't make a trunk snapshot recently you should take
http://zeosdownloads.firmos.at/download ... OMPACT.zip and replace your src directory with the new ones.
Mark