Subject Re: [IBO] Newbie: How to find a record in an IB_Grid. Help Please..
Author Svein Erling Tysvaer
At 20:52 15.01.2003 +0000, you wrote:
>I am currently writing an application using the IB_Query & IB_Grid
>components. I have a database populated with about 5,000 users,using
>the following query (qryUserInfo) to connect to an IB_Grid:
>
>Select * from "CombinedUserInfo"
>order by "FirstName", "LastName"
>
>"CombinedUserInfo" is a view table consisting of four tables. My
>problem is, when I need to go to a particular record in the IB_Grid
>I do this:
>
>qryUserInfo.Locate('UserID', UserID, []);
>
>This seems to take a very long time to find the record. Sometimes it
>is very fast but most often it is very very slow about a minute or
>more. Is there a better way to locate a particular record in the
>grid without downloading all the records everytime I do a search.
>
>I would apreciate any help. Are there some flags I should be setting
>somewhere on these components?

Hi Paul!

I decided not to answer this one, but that was quite a few hours ago and
no-one has answered you yet. The one thing that struck me was that this
seemed to be written by someone accustomed to desktop databases rather than
client/server. Generally, in client/server you should only get records of
interest, not the full table or view. I.e. it is OK to grab 5000 records if
they're all interesting - e.g. for some reports, but for showing in a grid
I would say most people rarely are interested in more than 10 records at a
time.

So, add a where clause to your query, and use that rather than locate.
Also, try out the searching capabilities of IBO, I haven't used them much,
but they are very simple to use.

HTH,

Set

- I support Firebird, I am a FirebirdSQL Foundation member.
- Join today at http://www.firebirdsql.org/ff/foundation