Page 1 of 1

Server Side DataChange

Posted: 30.01.2012, 01:23
by sfxcc
When we post a record and some fields are changed on server side it doesnt change the zeos dataset, we need to refresh the table which will force a dataset cursor pos change etc. not User friendly.


So there is any way to refresh only the updated/inserted row ?

Posted: 02.02.2012, 23:03
by enix
Yes. Use ZUpdateSQL assigned to ZQuery as UpdateObject.
Set ZUpdateSQL.RefreshSQL statetment that select current reccord, for example:
SELECT * FROM table WHERE PrimaryKeyID=:PrimaryKeyID
After post reccord You can refresh it by: ZQuery1.RefreshCurrentRow(true)

reg. Enix

Posted: 03.02.2012, 00:04
by sfxcc
Thanks enix, ill try it out.

:)

Posted: 15.03.2012, 00:48
by mdaems
sfxcc,

Did this work as expected?

Mark

Posted: 17.03.2012, 14:26
by sfxcc
I think its to weird the way this workd, if we do Refreshsql:= select * from table where akey=avalue it refresh the current record , but if no where it will refresh all table and move the cursor to first pos ....


Can it be possible no cursor pos move and refresh only all result of query ex: where field >= number

Posted: 25.04.2012, 21:52
by mdaems
sfxcc,

This would be an extremely difficult feature to implement as it involves evaluating the results you get from this refresh query and guess if the record is already in the dataset (and which record is it then?) or if it should be appended at the end of the dataset. So no... it's not a feature we can afford to add and maintain.
But nothing keeps you from refreshing the dataset and repositioning the cursor at the curent record.

Mark

Posted: 26.04.2012, 12:03
by markus
To add more - i think its almost impossible to refresh all updated records (but only them) for one big reason: trigger functions - they can change almost everything in DB.