Hi Phil.  Everything is fine down to here:

>So, I replaced the TTable for the Transaction table with a TQuery and
used
>a simple SQL that was updated every time the Client's TTable was
scrolled.
>Worked great! Except that I the resul was read only because the SQL
>involved more than one table (even though all the retrieved columns
were
>from the transaction table). I needed it to be live.

Firstly, you don't need to change the SQL every time - you can use the
TQuery's DataSource property.  This is basically the same as the
MasterSource property of a TTable.

Secondly, if you need a read only query to be live, it can be done
effectively in one of two ways.  The best way is probably to use a
TClientDataSet - Inprise encourage you to go down this path by
preference (granted, they want you to get introduced to MIDAS, and
TClientDataSet is a precursor to that :).  Have a look at the demos,
especially MIDAS\Aggregate for a good introduction to TClientDataSets.
The other way is to turn TQuery.CachedUpdates true and stick an
TUpdateSQL object on your form, setting the TQuery.UpdateObject to that,
and use ApplyUpdates, CommitUpdates, and CancelUpdates appropriately
(like every time you post).  Both methods are pretty straightforward.

>So, I still used the TQuery, I put back the TTable for the Transactions
>table, and I created a new filter for the Transactions TTable each time
the
>Client's TTable was scrolled, based upon the results of the TQuery.

Well, hey, if it works don't fix it!  :)  The only problems might be
speed, or if you decide you need all TQuerys at a later date.

Cheers,

Carl Reynolds                      Ph: +64-9-4154790
CJN Technologies Ltd.             Fax: +64-9-4154791
[EMAIL PROTECTED]                DDI: +64-9-4154795
PO Box 302-278, North Harbour, Auckland, New Zealand
12 Piermark Drive, North Harbour Estate, Auckland, NZ
Visit our website at http://www.cjntech.co.nz/
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to