Query results seem to be cached

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for MySQL in Delphi and C++Builder
Post Reply
Posts: 7
Joined: Fri 02 Sep 2011 13:15

Query results seem to be cached

Post by TreyThrasher » Fri 15 Nov 2013 20:31

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

Post by AndreyZ » Mon 18 Nov 2013 14:27

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

Post Reply