Page 1 of 1

RefreshQuick strange behavior ?

Posted: Fri 12 Dec 2008 15:54
by swierzbicki
Hi,

Today I started working with the RefreshQuick method for the 1rst time.
I've read the documentation and added a TimeStamp field called TimeStampModification (my table had already an Unique / Primary / AutoInc field).

When calling the refreshQuick method and setting the debugger to true MyDAC is generating this query :

Select
...
From Planning
Inner join ....
....
Where
....
AND planning.TimeStampModification >= '2008-12-29 00:00:00'
This looks good but the TimeStamp date is false !
'2008-12-12 00:00:00' instead of '2008-12-29 00:00:00'

Any clue ?

Posted: Tue 16 Dec 2008 12:13
by Dimon
A TimeStamp field keeps the date of the record latest modification. Therefore the RefreshQuick method gets the maximum timestamp value of an open recordset and uses it in the generated query. In this case it gets all records that were changed after last opening the recorset.
In your case it seems that your table contains a timestamp field with the specified value, which is incorrect, and you should correct it.

Posted: Tue 16 Dec 2008 15:30
by swierzbicki
Hi Dimon,

I have search through my record and didn't find a record having this value.
This SQL query always return an empty set :

Code: Select all

select * from planning where planning.TimeStampModification >= now()
I'll try to make you a demo project.

Posted: Wed 17 Dec 2008 13:36
by Dimon
It is possible that your query contains TimeStamp fields from this table or from other tables which belong to the same TableInfo object.