Page 1 of 1
[CLOSED] TZQuery with 'NewValue' and 'OldValue'
Posted: 06.10.2006, 14:49
by Urios
Hello everybody,
first of all, excuse my very very bad English (I'm French and frenchies don't speak english very well
).
Special thanks to the dev team of these fabulous components.
If i'm posting here it's because I have a problem with tzquery's 'OldValue' and 'NewValue' functions : values are the same even if they are different...
And I have tried a lot of things... unsuccessfully.
Posted: 04.01.2007, 17:22
by Urios
Hello,
Nobody has tried this ?
Posted: 04.01.2007, 18:12
by Urios
What I would like to do is rebuild the query of the UpdateSQL object in order to insert/update only the fields which were modified, according to the differents tables of the view on which I work.
Posted: 05.01.2007, 06:53
by fduenas
OldValue will store the original value of the field when the record is retreived for first time from the server. it stores the original value and not a value after a modification. So it functions for already existing records and not for newer ones
Posted: 05.01.2007, 09:21
by Urios
fduenas wrote:OldValue will store the original value of the field when the record is retreived for first time from the server. it stores the original value and not a value after a modification. So it functions for already existing records and not for newer ones
Ok, but in "beforepost", for a modified field or record, oldvalue and newvalue are always the same ! newvalue will only change after commiting the modifications ?
Posted: 08.01.2007, 09:08
by Urios
I have found a solution using datasource's "OnDataChange" !
I'm making an array with modified field names,
and in the tzquery's "BeforePost" method I'm modifying query's of tzupdate
object.
Thank you !