Board index » delphi » The way it its and the way i would like part II.

The way it its and the way i would like part II.

The way it its and the way i would like part II.

Hi,

I was wondering
If I have two datamodules.
One named DmFirstIdentify.
This data module would be composed  of several clientdatasets with the
fields
that the user needs to First identify a record in order for him or she
to edit
it or delete it.
Lets suppose(company,city,fone)
It would work like this.
If the clientdataset its not opened the application opens it.
When the user closes the form the client dataset is not closed.
When the users opens the same form and the client dataset is still
active it
only issues An updaterecords.
These clientdatasets will have only the fields needed to identify the
record
and those Fields that make part of the indexes.
They would have persistent indexes too.
When the user selects a record I would use another  clientdataset or
just a
 sqldataset at another Data module to retrieve edity and apply that
specific record.

Its a more complicatd code,but I think it would reduce the size of
the
packets,specially When talking about remote computing.

And if it doesnt  compromisse security this fisrt view
clientdatasets could
be saved To disk and become persistent,think of this if you have one
plant in
S?o Paulo and other in Rio de Janeiro.

What do you think about?
A-Impreove it.
b-Trow it in the garbage.
c-Suicide yourself.

 

Re:The way it its and the way i would like part II.


"Marcello Dias" <ME...@HOTMAIL.COM> skrev i melding
news:e8148a03.0301290347.71708eaf@posting.google.com...

Quote
> The way it its and the way i would like part II.

> Hi,

> I was wondering&#8230;
> If I have two datamodules.
> One named DmFirstIdentify.
> This data module would be composed  of several clientdatasets with the
> fields
> that the user needs to First identify a record in order for him or she
> to edit
> it or delete it.
> Lets suppose(company,city,fone)
> It would work like this.
> If the clientdataset its not opened the application opens it.
> When the user closes the form the client dataset is not closed.
> When the users opens the same form and the client dataset is still
> active it
> only issues An updaterecords.
> These clientdatasets will have only the fields needed to identify the
> record
> and those Fields that make part of the indexes.
> They would have persistent indexes too.
> When the user selects a record I would use another  clientdataset or
> just a
>  sqldataset at another Data module to retrieve edity and apply that
> specific record.

> Its a more complicatd code,but I think it would reduce the size of
> the
> packets,specially When talking about remote computing.

> And if it doesnt  compromisse security this &#8220;fisrt view&#8221;
> clientdatasets could
> be saved To disk and become persistent,think of this if you have one
> plant in
> S?o Paulo and other in Rio de Janeiro.

> What do you think about?
> A-Impreove it.
> b-Trow it in the garbage.
> c-Suicide yourself.

I've been doing something like this, apart from the "refresh an open
dataset" part, as I figure you don't win much over a close / open operation.
The "list view" contains only few fields, and this improves speed
substantially.

If you want to avoid having all data sent per wire every time a list is
opened, I believe you need some kind of "fetch what's new" - functionality,
maybe by maintaining a "serial id" (increased upon every update / delete /
insert), so that you retrieve a list of changed / new / deleted records
(select  company, city, phone from companies where serial_id >
:your_last_known_serial_id), and merge these two sets on the client.

It may be that you want to go for alternative c) at some point, but
remember: a TClientDataSet isn't worth dying for.

;-)
--
Bj?rge S?ther
bjorge@hahaha_itte.no

Other Threads