SQLRefresh?
SQLRefresh?
Can anyone tell me when do I need to use the SQLRefresh property of a TMyQuery? I have never needed to use it before, but I am coming up with a message telling me that the refresh failed (found 0 records) when I try to modify a reocrd - it seems that the record can't be found after I change one of the numeric fields. Are there any guidelines as to when this needs to be used? Also, is there any simplified way of putting SQL statements in here? Currently, I am filling it with an (almost) exact copy of the original query in order for it to find the record that it being changed, but it seems that it should only really need to know what the key fields are that identify the record, rather than the whole query complete with select clause and joins. Am I making sense?
Re: SQLRefresh?
> Can anyone tell me when do I need to use the SQLRefresh property of a TMyQuery?
At the most cases there is no need to fill SQLRefresh, SQLInsert, SQLUpdate and SQLDelete.
> message telling me that the refresh failed (found 0 records)
As usual, these problems can happen if you don't have a unique key field in the query. Add unique key fields and the problem will be solved.
At the most cases there is no need to fill SQLRefresh, SQLInsert, SQLUpdate and SQLDelete.
> message telling me that the refresh failed (found 0 records)
As usual, these problems can happen if you don't have a unique key field in the query. Add unique key fields and the problem will be solved.