Link to home
Start Free TrialLog in
Avatar of girona
girona

asked on

Cache Updates

I've made an application that uses Cache Updates to save records in tables when I'm sure I want to save them or be able to discard them if I change my mind or they are incorrect. The problem is that I want to make a 'Find key' of the records physically saved in the tables and the records that are awaiting to be saved. Anyone knows how can I do that? Thank you.
ASKER CERTIFIED SOLUTION
Avatar of icampbe1
icampbe1

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of girona
girona

ASKER

I asked that question in order not to do the temporary table and work on it. What I want is using Cache Updates be able to accede all the records indistinctively. I don't want to use temporary tables because it is more work and they are slower to control and copy a lot of records in a temporary table and after that copy them again in the final table.
Avatar of girona

ASKER

I've made an auxiliar table and when I want to save the data I use the 'BatchMove' function and then I empty the auxiliar table with EmptyTable. Do you know if there is any way of doing that better? Thanks.
Not really, you have to move the records (kinda like posting them) and then empty the dataset.   I know you feel that this is a bit of extra work, but you can make it all one step.  Just write a single routine called MyPost and put it in there.  

I don't know your experience level, but you could subclass TTable and make all your routines methods of a new component TStagingTable and use that all the time instead (actually, I like that idea).  

Once you have implemented this, you will have a very good base to build around (see my previous notes).

The need that you had to identify the 'cached' records is just one example of the things that you can now do.  If you ever need to implement  a good rollback mechanism, you will have a good start.

Cheers,
Ian C.