Subject RE: [IBO] Bookmarks
Author Jason Wharton
I don't see anything off hand here.
Have you looked at what the SQL trace monitor is doing?
Where do you suspect the difference stems from?

Jason Wharton

-----Original Message-----
From: Robert martin [mailto:rob@...]
Sent: Monday, July 19, 2004 4:50 PM
To: IBObjects@yahoogroups.com
Subject: [IBO] Bookmarks


Hi All

I am having performance problems with the following code using an IBOQuery
component. Can anybody see something obvious I am doing wrong (worked great
with the BDE unfortunately).



var
MyBookmark : TBookMark;
EntityRef : Integer;
Counter : Integer;
begin
Result := True;
EntityRef := -1;

with zClientOrderStatusDM.OrderInQuery do begin
DisableControls;
MyBookMark := GetBookmark;
try

Counter := 0;
while (Counter < OrdersDBGrid.SelectedRows.Count)
and (Result = True) do begin

GotoBookmark(Pointer(OrdersDBGrid.SelectedRows.Items[Counter]));

if (EntityRef = -1) then begin
//First instance of client
EntityRef := FieldByName('EntityRef').AsInteger;
end
else if (EntityRef <> FieldByName('EntityRef').AsInteger)
then begin
//Row Select for another client
Result := False;
end;
Inc(Counter);
end;
finally
GotoBookmark(MyBookMark);
FreeBookmark(MyBookMark);
EnableControls;
end;
end;




Rob Martin
Software Engineer

phone 03 377 0495
fax 03 377 0496
web www.chreos.com