[CLOSED] TZQuery with 'NewValue' and 'OldValue'

Forum related to version 6.5.1 (alpha) and 6.6.x (beta) of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
Urios
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: 06.10.2006, 14:39
Location: Aix-en-Provence

[CLOSED] TZQuery with 'NewValue' and 'OldValue'

Post 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.
Last edited by Urios on 08.01.2007, 09:09, edited 1 time in total.
Urios
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: 06.10.2006, 14:39
Location: Aix-en-Provence

Post by Urios »

Hello,

Nobody has tried this ?
Urios
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: 06.10.2006, 14:39
Location: Aix-en-Provence

Post 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.
User avatar
fduenas
Zeos Dev Team
Zeos Dev Team
Posts: 132
Joined: 26.08.2005, 08:12
Location: Cancún

Post 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
Urios
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: 06.10.2006, 14:39
Location: Aix-en-Provence

Post 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 ?
Urios
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: 06.10.2006, 14:39
Location: Aix-en-Provence

Post 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 !
Post Reply