Board index » delphi » Inprise Update: use TClientDataSet instead of cached updates

Inprise Update: use TClientDataSet instead of cached updates

Official Inprise (http://www.inprise.com/techpubs/delphi/update.html):

Quote
> Addendum to Chapter 24, "Working with caches [sic] updates:" If you
> have Delphi Client/Server edition, it is preferable to use
> TClientDataSet instead of cached updates.

Is this really true?  Why?  Can someone elaborate?

Thanks.
    - Richard Tenney

 

Re:Inprise Update: use TClientDataSet instead of cached updates


Quote
>> Addendum to Chapter 24, "Working with caches [sic] updates:" If you
>> have Delphi Client/Server edition, it is preferable to use
>> TClientDataSet instead of cached updates.

>Is this really true?  Why?  Can someone elaborate?

The TClientDataSet component provides all the capabilities of cached updates
(you lose nothing), but has a lot of additional features.  For example,
TClientDataSet (which is part of the Midas technology) allows multiple
masters and details to be edited at the same time.  Cached updates requires
all details to be posted before moving to a new master record.

The TClientDataSet also supports the briefcase model, which means that the
cache can be stored locally between sessions.  This allows remote use
without a physical connection to the db, and can greatly reduce network
traffic.  Changes can be applied hours, days, or even weeks later.  There is
a resolver paradigm to enable you to deal with update conflicts, and while
the logic to do this in a briefcase model can be somewhat complex, it's not
really any different from what you need to do with cached updates.

Another benefit of using TClientDataSet is that it causes your program to be
architecturally compatible with a multi-tier architecture, making it
possible to extend your application (if you're so inclined) with FAR less
work.  Of course, there's a licensing fee for the Midas technology if you
move to multi-tier (and thus eliminate the need for the BDE on your client
machines), but it's royalty-free in a two-tier envoronment (as long as the
provider is on each client's machine).

One other point that should also be considered is that the cached updates
mechanism has been pretty much unchanged since its introduction in D2, and
there are still a fair number of bugs in it.  The Midas technology, on the
other hand, continues to be expanded and improved, and seems quite a bit
more stable.

Hope this helps,

Mark

Re:Inprise Update: use TClientDataSet instead of cached updates


I just got back from the conference.  I attended a session by Dan Miser
about using TClientDataSet instead of cached updates.  He pointed out all
the advantages of using TClientDataSet including: more flexible, more
powerful, less problems with master/detail data updates...
BTW if Dan is reading this message, Thanks, it was an excellent session.
Ba

Re:Inprise Update: use TClientDataSet instead of cached updates


Ummm,  I think D4 USES TClientDataSets for cached updates.

Just my .02 worth
- David Scheidt

Quote
Ba wrote in message <35D32B2C.B9243...@pacbell.net>...
>I just got back from the conference.  I attended a session by Dan Miser
>about using TClientDataSet instead of cached updates.  He pointed out all
>the advantages of using TClientDataSet including: more flexible, more
>powerful, less problems with master/detail data updates...
>BTW if Dan is reading this message, Thanks, it was an excellent session.
>Ba

Re:Inprise Update: use TClientDataSet instead of cached updates


Ba,
Thanks for the confirmation.

Did Dan Miser suggest any places that have some examples with some
discussion?  If I want to use TClientDataSets just like cached updates,
do I end up writing code to create and load up ClientDataSet tables that
mirror the original InterBase tables?  Do I have to write a (trivial)
server process to act as an intermediary (TProvider I think it's
called)?

As you can see, I'm still pretty confused about this.  I'll go re-read
chapter 23 of the Delphi 4 Developer's Guide and look at
...\Delphi4\Demos\MIDAS\Mstrdtl again, but more guidance would help.
And something that showed the use of TClientDataSets as a replacement
for CachedUpdates would be fantastic!

Any lurkers out there with suggestions, please feel free to jump in.

Thanks,

    - Richard

Re:Inprise Update: use TClientDataSet instead of cached updates


Dan will be putting up some examples on his web site sometime soon (his
Session indicated that he will have D4 examples sometime after the BorCon
wrapped up.
http://www.execpc.com/~dmiser/dcom.htm

Basically you work very similar to Cached Updates.  You still use your TQuery
/ TTable components, but then tie them to a TProvider.  You tied the
TClientDataSet to the TProvider and the TDataSource to the TClientDataSet and
work like before.  But now the TClientDataSet controls updating, etc.  This
can all be done with no code written.

Obviously I didn't go into detail, but hopefully this will get you started a
little bit more.  Dan regularly is in the multi-tier group so you can post
questions there about this and Dan or Josh will probably help you out.

Jeff Overcash

In article <35D5CF21.641A6...@cs.umb.edu>, Richard L Tenney <r...@cs.umb.edu>
wrote:

Quote
>Ba,
>Thanks for the confirmation.

>Did Dan Miser suggest any places that have some examples with some
>discussion?  If I want to use TClientDataSets just like cached updates,
>do I end up writing code to create and load up ClientDataSet tables that
>mirror the original InterBase tables?  Do I have to write a (trivial)
>server process to act as an intermediary (TProvider I think it's
>called)?

>As you can see, I'm still pretty confused about this.  I'll go re-read
>chapter 23 of the Delphi 4 Developer's Guide and look at
>....\Delphi4\Demos\MIDAS\Mstrdtl again, but more guidance would help.
>And something that showed the use of TClientDataSets as a replacement
>for CachedUpdates would be fantastic!

>Any lurkers out there with suggestions, please feel free to jump in.

>Thanks,

>    - Richard

Re:Inprise Update: use TClientDataSet instead of cached updates


Cached Updates are a Delphi 2 solution that have no application to
3-tier programming or anything else new or {*word*226}.

Client DataSets are a Delphi 3 solution that are very important for
3-tier programming and will likely be fixed, enhanced, and improved.

Which should you pick? <G>

To use ClientDataSets in a single EXE, you need to drop or link a
TProvider on the same form as the TClientDataSet. It gets a bit crowded,
but the actualy overhead of going through two extra components is
minimal.

Cheers

Quote
Richard L Tenney wrote:

> Ba,
> Thanks for the confirmation.

> Did Dan Miser suggest any places that have some examples with some
> discussion?  If I want to use TClientDataSets just like cached updates,
> do I end up writing code to create and load up ClientDataSet tables that
> mirror the original InterBase tables?  Do I have to write a (trivial)
> server process to act as an intermediary (TProvider I think it's
> called)?

> As you can see, I'm still pretty confused about this.  I'll go re-read
> chapter 23 of the Delphi 4 Developer's Guide and look at
> ...\Delphi4\Demos\MIDAS\Mstrdtl again, but more guidance would help.
> And something that showed the use of TClientDataSets as a replacement
> for CachedUpdates would be fantastic!

> Any lurkers out there with suggestions, please feel free to jump in.

> Thanks,

>     - Richard

Other Threads