TZUpdateSQL

Forum related to version 6.1.5 of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
nelson777
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: 03.03.2006, 00:42

TZUpdateSQL

Post 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
pol
Senior Boarder
Senior Boarder
Posts: 91
Joined: 13.10.2005, 08:19

Post 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
nelson777
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: 03.03.2006, 00:42

Post 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
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post 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
Image
nelson777
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: 03.03.2006, 00:42

Post by nelson777 »

Perfect. Just what I wanted. Thnkx.
a_nouri_s
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 03.03.2006, 20:36
Contact:

Post by a_nouri_s »

:sailor: very good. thanks
a_nouri_s
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 03.03.2006, 20:36
Contact:

Post by a_nouri_s »

MYSQL 5.0.X where supported?
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

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