Moises
A few Suggestions
1/ dont use server side cursors you are forcing a fetch from the server
everytime
you scroll thru the dataset (hence the slowness) This doesn't scale up well
as it puts
a high demand on the server
2/ Either use a client side cursor (and try and keep the dataset size small)
or
parametize your query and reexecute it (another performance tip, always
disable controls
when loading or scrolling, even if you have no controls bound)
HTH
Neven
----- Original Message -----
From: Moises Lopez <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Sent: Monday, 21 May 2001 22:24
Subject: Re: [DUG]: Locating a record in a Server-side cursor query
> since i needed to refresh the data every once in a
> blink, and i needed to locate the record ....
>
> now.. what i finally did
>
> var
> bm: TBookmark;
> begin
> Screen.Cursor := crHourGlass;
>
> // disconnect the grids from the datasource
> // it refetches the records when connected
> DataSource1.DataSet := nil;
>
> ADOTable1.DisableControls;
> ADOTable1.Filter := 'whatever filter goes';
> ADOTable1.Filtered := true;
> ADOTAble1.Active := true;
> bm := ADOTable1.GetBookmark;
> ADOTable1.Filtered := false;
> DataSource1.DataSet := ADOTable1;
> ADOTable1.GotoBookmark(bm);
> ADOTable1.FreeBookmark(bm);
> ADOTable1.EnableControls;
> Screen.Cursor := crDefault;
> end;
>
>
> demi-crappy but its 3.23 am and im just sputtering..
> and it seems to work...
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices
> http://auctions.yahoo.com/
> --------------------------------------------------------------------------
-
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
>
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"