Subject RE: [IBO] Bookmarks
Author Jason Wharton
How many columns are in the table/query?
There is a possibility that it is scanning all the columns over and over and
that the FieldByName is the slowdown rather than the bookmarks.
Try making it a persistent field and see if that helps.

Jason Wharton

-----Original Message-----
From: Robert martin [mailto:rob@...]
Sent: Wednesday, July 21, 2004 6:27 PM
To: IBObjects@yahoogroups.com
Subject: Re: [IBO] Bookmarks


HI Jason

I was really hoping I was doing something wrong with IBO. The code is used
in conjunction with a IBOQuery that displays items in a multi select grid.
As each item is selected the code goes and checks all other items to see if
they are for the same client, if not it disables a group of buttons. On my
machine (Athalon XP 24000, with database) the performance slows down
noticeably as more and more rows are selected. On out test machine (Celeron
400, networked to the Database) the performance slows down so much after 3
rows are selected that it appears the machine has frozen!


I am open to other easily implemented solutions :)

Rob Martin
Software Engineer

phone 03 377 0495
fax 03 377 0496
web www.chreos.com
----- Original Message -----
From: Jason Wharton
To: IBObjects@yahoogroups.com
Sent: Thursday, July 22, 2004 1:21 PM
Subject: RE: [IBO] Bookmarks


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