Bookmark - Datensatz nicht gefunden (Record not found)

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
michaelJ
Posts: 30
Joined: Thu 13 Jan 2011 16:11

Bookmark - Datensatz nicht gefunden (Record not found)

Post by michaelJ » Fri 25 Mar 2011 16:36

Hello,

the following code procuces the Error 'Datensatz nicht gefunden' when I Call the 'GotoBookmark' command.

Under IBX it works fine - with IBDAC the Error occurs.
GetBookmark brings back a pointer and the Check BookmarkValid(Bookmark) also passes. But GotoBookmark(BookMark) cound't work correctly with the pointer.


I don't want to use the Refresh-Command, because I used very often im my project.

Michael


Code: Select all

var
Bookmark: TBookmark;
begin


with IBCQuery do
begin
 Close;
     SQL.Text:='Select * from MBLOG WHERE MNFID=:MNFID AND IMPDAT=:IMPDAT order by LRLOGID DESC';
     ParamByName('MNFID').AsInteger:=4;
     ParamByName('IMPDAT').AsDate:=now;
 Open;
 end;



Bookmark:=IBCQuery.GetBookmark; //Unit DB

with IBCQuery do
begin
 Close;
     SQL.Text:='Select * from MBLOG WHERE MNFID=:MNFID AND IMPDAT=:IMPDAT order by LRLOGID DESC';
     ParamByName('MNFID').AsInteger:=1;
     ParamByName('IMPDAT').AsDate:=now;
 Open;
 end;


if IBCQuery.BookmarkValid(Bookmark)=True then
 IBCQuery.GotoBookmark(BookMark); //Error Here!!

AndreyZ

Post by AndreyZ » Mon 28 Mar 2011 09:46

Hello,

I cannot reproduce the problem. Please try composing a small sample to demonstrate the problem and send it to andreyz*devart*com, including a script to create and fill a table. Also please specify the following:
- the exact version of IBDAC. You can learn it from the About sheet of TIBCConnection Editor;
- the exact version of your IDE;
- the exact database server (FireBird or InterBase) and its version. You can learn it from the Info sheet of TIBCConnection Editor.

michaelJ
Posts: 30
Joined: Thu 13 Jan 2011 16:11

GotoBookmark - Datensatz nicht gefunden

Post by michaelJ » Fri 08 Apr 2011 12:16

Hello,

sorry for the long answer. Now i have some addtional information. So maybe it helps you to solve the problem without database extract which is very difficult for me to isolate it.

Code: Select all

if IBCQuery1.BookmarkValid(Bookmark)=True then
 IBCQuery1.GotoBookmark(BookMark); //Error!

The following code works, when the SQL-Statement is a query on a table.
When I use a stored procedure in the query the error 'IBCQuery1 - Datensatz nicht gefunden' occurs.

With IBX no Error Message will be generated, when the 'GotoBookmark' statement failes. With IBDAC the ErrorMessage has shown. It ist correct, that the bookmark for the row ist not found, because the data has completly changed.

But what ist the reason for the difference? (IBX: no message; IBDAC:EDataBaseError-Exception)

Michael

PS:
version of IBDAC: V3.50.0.21
version of your IDE: Delphi 2007E 11.0.2902.10471
database server: Firebird V1.5.5 4926

AndreyZ

Post by AndreyZ » Fri 08 Apr 2011 13:56

Thank you for the information. We have reproduced this problem and fixed it. This fix will be included in the next IBDAC build.

michaelJ
Posts: 30
Joined: Thu 13 Jan 2011 16:11

Post by michaelJ » Fri 08 Apr 2011 13:57

Perfect! Thank You!

Michael

avenger
Posts: 1
Joined: Fri 30 Nov 2012 07:22

Re: Bookmark - Datensatz nicht gefunden (Record not found)

Post by avenger » Fri 30 Nov 2012 07:27

This message was removed by moderator.

AndreyZ

Re: Bookmark - Datensatz nicht gefunden (Record not found)

Post by AndreyZ » Fri 30 Nov 2012 08:37

To avenger:
If you want to ask questions using Russian language, please ask them at our Russian forum: http://forums.devart.com/ru

AndreyZ

Re: Bookmark - Datensatz nicht gefunden (Record not found)

Post by AndreyZ » Fri 30 Nov 2012 08:38

The problem with bookmarks was fixed in UniDAC 3.70.0.17.

Post Reply