The notion of workstation-local database files (e.g. Paradox-format
tables created through BDE) has been much maligned in some circles ...
but it can be an extremely effective way to design a robust application
that's easy on the network.
A traditional Paradox (or Delphi) application often works with the
tables on the server directly. Or it uses a hybrid approach provided by
BDE (cached updates). This leads to a lot of server-traffic and a lot
of open transactions. This can be avoided.
How? Use the local workstation "like the computer IT is, too."
Instead of using direct and constant connections to the live tables,
what if you retrieve the desired records to the local workstation,
manipulate them directly (essentially "off-line" from the server's point
of view), then, when the user presses OK, update them?
(This would consist of starting a transaction that deletes the old
records from the server, inserts the replacement set, and commits.
Say...)
(This involves having local tables that mirror the structure of the ones
on the server... possibly without keys.)
Naturally you have to have some means of detecting when the records have
changed. A change-counter in the master record (on the server) is a
simple way to do this. Each time you update the records, you bump the
counter. When you're ready to update, make sure (within the
transaction) that the value hadn't changed.
Sure, this requires a little more programming: but it's a lot more
efficient in many typical order-handling (etc...) office situations.
Check it out!
------------------------------------------------------------------
Sundial Services :: Scottsdale, AZ (USA) :: (480) 946-8259
Quote:> Fast(!), automatic table-repair with two clicks of the mouse!
> ChimneySweep(R): "Click click, it's fixed!" {tm}
> http://www.sundialservices.com/products/chimneysweep