Page 1 of 1

TZUpdateSQL

Posted: 03.03.2006, 00:47
by nelson777
How exactly do I use TZUpdateSQL ?

I use a TZQuery with UpdateObject property set, cachedupdates=true, but the associated dbgrid is still readonly. Do I have to use RequestLive = True ? it works, but I just don´t want a live connection to the db.

What´s the right way to do it ?

thnx,
Nelson

Posted: 03.03.2006, 09:56
by pol
You only need TZUpdateSQL if your query is so complicated (joins) that Zeos can't generate an update sql by itself. Then you have to write your own insert/update/delete SQL in TZUpdateSQL.
And yes, you have to set RequestLive = true (in 6.5.1: ReadOnly = false), for else it is in fact readonly.

Regards,
Rüdiger

Posted: 03.03.2006, 13:59
by nelson777
Thnx for your answer.

Does that means I have a live connection to the DB at all times ? even with cachedupdates on ? If thats true what would be the advantage over using a TZTable instead ?
I'm on Delphi 4. Can't use 6.5.1

Nelson

Posted: 03.03.2006, 14:25
by mdaems
Hi Nelson,

Yes, you have a live connection at all times, but with cached-updates the data is only posted to the server on commit or when requested. In the meantime the updated values are only visible to your application. If you would abort the operation before post the server wouldn't even notice you tried to modify the data.

Mark

Posted: 03.03.2006, 16:02
by nelson777
Perfect. Just what I wanted. Thnkx.

Posted: 03.03.2006, 21:10
by a_nouri_s
:sailor: very good. thanks

Posted: 03.03.2006, 21:11
by a_nouri_s
MYSQL 5.0.X where supported?

Posted: 04.03.2006, 14:48
by mdaems
To Nelson :
There's also a downside: other queries on the same (or another) connections won't see the changes as well!! So always think about this.

Bye,
Mark

To a_nouri_s:
You can use zeoslib with mysql 5. As far as i know it's not explicitly included, but apparently the mysql api didn't change that much between 4.1 and 5.0
Please have al look at older threads about how to bypass (basicly, you can substitute the dll-file (windows) by using the 5.0 one). If you want to use very specific features of 5.0, I don't know, but I see no novelties that would make problems. I work on 5.1 in this way (using the 5.0 dll).

I don't remember whether somebody already committed himself to provide 5.0 support. Maybe you can try to open a separate thread to clear out what's planned to be implemented in the promised version 6 (was it 6?).

BTW : Can you please stop putting this same question in every thread. I only answered this one to stop your rather annoying behaviour. Most of us DO read new posts and answers.
Enjoy Zeoslib. I hope I did not offend you to much with the last comment.
Bye,
Mark