🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.multi-tier
Article #1673

Re: TClientDataSet

#1673
From: John Graham
Date: Fri, 23 Jul 1999 00:00
50 lines
2698 bytes
Alex,

One should rarely access all records in a data table at the same time. Your
users probable only need to see records that meet some condition and those
are the only records that should be accessed.

If you use a TTable object in your application server's remote data module,
your client dataset will attempt to download all records to your PC when you
set its Active property to "true" or call its Open() method.  Some of the
records will be in RAM, and some of them will be in virtual memory ( hard
disk ).  It's very time consuming to do things this way, and you will fill up
your available memory quickly.

What I suggest is that you install a TQuery component in your app. server's
data module, export it, and hook your client dataset to it.  You can then
create an instance of the remote data module's dispatch interface in your
client.  This can be used to send an SQL statement as well as parameters and
their values to the TQuery object.

This way you can display only those records that your users are interested
in.  For an example of how to accomplish this, see the AdHoc example in the
MIDAS section of the BCB "Examples" sub directory.  You might want to take a
look at the EmpEdit example as well.

Naturally you need to have all the collateral stuff present in your client
app. as well, such as a remote connection object, grids, data sources, etc.

You might also try filtering the client dataset to access only those records
that are required.  I'm not sure how the filter works, but it's easy to set
up and activate and should be easy to test.

However, I like SQL because of its flexibility and ease of use.  If you're
not familiar with it I respectfully suggest you get that way.

Regards,
John

Alex wrote:

> Hi All!
>
> Maybe somebody will be so kind as reply on this question?
>
> I have a  lookup table about 100 000 records size, all of them user needs
> look for results visually.
> Can you explain me, does all 100 000 records store by TClientDataSet in
> memory, or there is some data on disk. What technique shoud I use To
> implement such big databases.
>
> Alex.
Technical Details
Message-ID: <37987912.E8D68535@salts.navy.mil>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7n76er$mda12@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fcd2b,ad2296fd3e4a2570
X-Google-Attributes: gidfcd2b,public
From: John Graham <jgraham@salts.navy.mil>
Subject: Re: TClientDataSet
Date: 1999/07/23
Message-ID: <37987912.E8D68535@salts.navy.mil>
X-Deja-AN: 504409895
Content-Transfer-Encoding: 7bit
References: <7n76er$mda12@forums.borland.com>
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
Organization: U. S. Navy SALTS Project
Mime-Version: 1.0
Newsgroups: borland.public.cppbuilder.database.multi-tier