Transactions

The official tester's forum for ZeosLib 7.1. Ask for help, post proposals or solutions.
Post Reply
sfxcc
Senior Boarder
Senior Boarder
Posts: 95
Joined: 13.05.2010, 18:48

Transactions

Post by sfxcc »

I have a masterTable and a detail table on postgresql, i need to inset mastertable line and the the details lines.

How can i do this two tables if on fail rollback ? cached updates is for own table how can i do both be on same commit ?

This to avoid convert tables to sql text because then work ... any change to be with zquery components?
where's the code ..
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Re: Transactions

Post by EgonHugeist »

Hi Sergio,

Use ChachedUpdates for the TZDataSet descendants. TZConnection.AutoCommit schould be False.

Than use the TZDataSet.Options := TZDataSet.Options + [doUpdateMasterFirst].
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
Post Reply