Hello,
Using SDAC 4.50.0.39 Professional D5.
1. RefreshRecords only works if the MSQuery component has ReadOnly = False ( I will not make updates - because I have established ReadOnly = True - for performance as you state in the documentation - ... but other applications / users can make changes to the data ! I have to do a Full Refresh ).
2. RefreshRecords does not work with fkLookup fields, if Options.CacheCalcFields = True.
My trouble is that locally sorting using IndexFieldNames is extraordinary slow, when the sort field is a fkLookup ( with 5000 records, takes 15 seconds ... ). It seems to me that you're using a very inefficient sort algorithm ( something like performing n*n comparations to sort n records, so with a fkLookup field, this is very slow ... ¿ don't use Quicksort ? ).
So, I have to activate the Options.CacheCalcFields ... and the sort speed with IndexFieldNames is aceptable.
But then, RefreshRecord will not work with the fkLookup Fields if CacheCalcFields is True ... they will show always the old value, not the corresponding to the "Refreshed" version of the record.
Is there any workaround ?
Regards,
Lluis Olle
RefreshRecords
If you set ReadOnly to True, TMSQuery does not get the additional information about tables and fields from SQL Server. So TMSQuery cannot generate SQL statement used to select new values for a record.
You can solve this problem in several ways:
1) assing a value to the SQLRefresh property manually;
2) for the latest SDAC build you can assing values to the UpdatingTable and KeyFields properties.
We have fixed the problem with CacheCalcFields. The fix will be included in the next build of SDAC.
You can solve this problem in several ways:
1) assing a value to the SQLRefresh property manually;
2) for the latest SDAC build you can assing values to the UpdatingTable and KeyFields properties.
We have fixed the problem with CacheCalcFields. The fix will be included in the next build of SDAC.