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!!