hi everybody,
I'm compiling a program with Delphi 7 + MySQL and ZeosLib 6.1.5.
I have a Table (users_t) with a field called 'lastupdt', TIMESTAMP kind.
Well,first question:
Why, with a ZTUsers.Append and then ZTUsers.Post, doesn't the 'lastupdt' field update itself automaticly, as well as I expect ?
second question:
Please let me know how do you use ZUpdateSQL .
Where is, in its properties, DBConnection? Where is Active=true/false?
Thank you for your kind attention
regards from ITALY
TZUpdateSQL and other questions
Moderators: gto, cipto_kh, EgonHugeist
Hi!
From the MySQL Manual:
You only need a ZUpdateSQL if you want to do something special, update several tables etc. Normally the Zeos-generated update code is sufficient. If you need a ZUpdateSQL, you put its name in the UpdateObject property (combobox, it will show a ZUpdateSQL on the form) of a ZQuery or ZTable.
HTH
Rüdiger
From the MySQL Manual:
So you might try to set your TField lastupdt.value to NULL before you post. That should work.Automatic updating of the first TIMESTAMP column occurs under any of the following conditions:
* The column is not specified explicitly in an INSERT or LOAD DATA INFILE statement.
* The column is not specified explicitly in an UPDATE statement and some other column changes value. (Note that an UPDATE that sets a column to the value it already has will not cause the TIMESTAMP column to be updated, because if you set a column to its current value, MySQL ignores the update for efficiency.)
* You explicitly set the TIMESTAMP column to NULL.
You only need a ZUpdateSQL if you want to do something special, update several tables etc. Normally the Zeos-generated update code is sufficient. If you need a ZUpdateSQL, you put its name in the UpdateObject property (combobox, it will show a ZUpdateSQL on the form) of a ZQuery or ZTable.
HTH
Rüdiger