--- In delphi-en@yahoogroups.com, "dinol.softedge" <[EMAIL PROTECTED]> wrote:
>
> Hi
> 
> I open all my datasets on the create event of the main form.  It has
> been working fine but obviously the more datasets I create and the
> more data in them, the slower the system opens.  Is there a better way
> of opening datasets? btw I only open report datasets when running
reports
> 
> Thanks
>
Hi Dinol,
Your best solution is to open datasets only when you need them and
then close them when you don't need them. Immediately prior to
accessing a database check that is is open and if not open it. 
You can skip this step entirely by setting dataset to active on each
access using "Dataset.Active := True" . If the dataset is not active
then this will open it, if it is open then your command will be ignored.

I assume that you are displaying database data in a TGrid or
TListView. Use the OnGetData (or similar) event to open your dataset

hth

Mick

Reply via email to