Page 1 of 1

Query results seem to be cached

Posted: Fri 15 Nov 2013 20:31
by TreyThrasher
I have a problem that has been driving my crazy for a long time. I have an application that has a master clientdataset with several linked child clientdatasets. From time-to-time, a specific one of the child clientdatasets will pull stale data like it is reading from a cache. For example, a user will move onto the master clientdataset and see a result set of the corresponding child dataset records. They then move to another master record. Another user adds additional child dataset records. The user then returns to the master record and will see the child dataset records that they originally saw (without the records added by the other user). To my knowledge, this is only happening on one of the several child clientdatasets. I have looked everywhere for some property that I might have set to cause this result. Any idea what might be causing this behavior?

Re: Query results seem to be cached

Posted: Mon 18 Nov 2013 14:27
by AndreyZ
TClientDataSet represents an in-memory dataset, which means that it caches all data on the client. To make TClientDataSet obtain the new records from the server, you should call the Refresh method. Fore more information, please refer to http://docwiki.embarcadero.com/Librarie ... entDataSet