#1 2014-10-13 01:54:31

Feng
Member
Registered: 2013-05-15
Posts: 28

ExecuteList multi-table query can not get the latest data,Help

TSQLRestClientURI.ExecuteList method in a multi-table(Basic information table with the data table) queries related situation can not get to the latest data by ORM inserted(Real-time data is inserted), restart the server can. Using an external database(MS SQLSERVER2014 Express LocalDB), I do not know why?

In addition, TSQLRestClientURI.ExecuteList method when single-table queries can use the ID field as where the conditions associated with the opposite in multi-table queries when RowID field can only ask what the next internal implementation The difference?

thanks.

Offline

#2 2014-10-13 08:34:59

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,661
Website

Re: ExecuteList multi-table query can not get the latest data,Help

How is the data inserted?
Is it inserted in SQL from an external process, outside the ORM?

If this is the case, you may:
- Either disable the SQLite3 result cache, by setting TSQLDatabase.UseCache := false - from aServerDB.DB.UseCache;
- Or write your SQL statement directly to the external database, by-passing the ORM.

In fact, if your query use a JOIN - which sounds to be the case - by-passing the ORM would result in a faster process, and also switch the cache.

In all cases, please read the document about all available "cache" in the SAD 1.18 pdf.

Offline

#3 2014-10-13 08:52:16

Feng
Member
Registered: 2013-05-15
Posts: 28

Re: ExecuteList multi-table query can not get the latest data,Help

Thank you for your prompt reply.

Data is through TSQLRestClient.Add (Value: TSQLRecord; SendData: boolean; ForceID: boolean = false) method call is inserted.
I also think it is cache problem, I would look under the document cache related content.

Offline

Board footer

Powered by FluxBB