Subject Re: [ib-support] Post in transaction
Author Burak OZLER
if transaction 2 changes 1 to 5 records you're right. But most of the time transaction calls 3 or 5 procedure. These procedures makes inserts and updates about 20 table..

Regards
Burak
----- Original Message -----
From: Brian L. Juergensmeyer
To: ib-support@yahoogroups.com
Sent: Wednesday, February 19, 2003 6:12 PM
Subject: Re: [ib-support] Post in transaction


Hi, Burak (and all),

Silly question: Is there a reason that this couldn't be changed from

Transaction1.Begin
...
Transaction2.Begin
...
Transaction2.Commit
Transaction1.Commit

to something like

Transaction1.Begin
...
Record.Add;
Transaction1.Commit
Transaction2.Begin
...
try
Transaction2.Commit
except on SomeError do
Record.Delete
end;

This way, if you receive an exception or inconsistent data, you can delete the results from your first commit and your database will still remain consistent, correct?

Just a thought,

Brian
----- Original Message -----
From: Burak OZLER
To: ib-support@yahoogroups.com
Sent: Wednesday, February 19, 2003 9:23 AM
Subject: Re: [ib-support] Post in transaction


yes all or nothing...

if the procedures gets an error then I want to give the user a chance to correct the values that s/he entered the form by rollbacking the second not rollback all the data. Indeed I need nested transactions but firebird doesn't support it yet..

regards
burak..
----- Original Message -----
From: Wilson, Fred
To: 'ib-support@yahoogroups.com'
Sent: Wednesday, February 19, 2003 4:55 PM
Subject: RE: [ib-support] Post in transaction


Sounds like you're interested in a "all or nothing" thing, that is, all the
SQL statements must succeed or you want none of them to succeed. A single
transaction does just that, either commit or rollback..
If that's not what you're trying to do, please explain further.


Best regards,
Fred Wilson
SE, Böwe Bell & Howell
fred.wilson@...



-----Original Message-----
From: Burak OZLER [mailto:burak.ozler@...]
Sent: Wednesday, February 19, 2003 7:21 AM
To: ib-support@yahoogroups.com
Subject: Re: [ib-support] Post in transaction


I need the second Transaction becouse of data security.
I start a transaction then I run lots of procedures in an other transaction
if procedures works well then I commit trn2 then trn first.

----- Original Message -----
From: benno
To: ib-support@yahoogroups.com
Sent: Wednesday, February 19, 2003 4:11 PM
Subject: Re: [ib-support] Post in transaction


Hi,

----- Original Message -----
From: "Burak OZLER" <burak.ozler@...>
To: <ib-support@yahoogroups.com>
Sent: Wednesday, February 19, 2003 3:02 PM
Subject: [ib-support] Post in transaction


> Hi all,
>
> I have a problem that must have solved very urgently.
>
> 1 - I start a transaction1
> 2 - Edit AA
> 3 - Change a value at table AA
> 4 - Post AA
> 5 - Start transaction2
> 5 - Change or insert a record to an another table (BB), one field at BB
references a field at AA
> 6 - The referenced value at BB is the row at AA that was edited and
posted.
> 7 - When I try to post the data at BB I get an
> "lock conflict on no wait transaction
> violation of FOREIGN KEY constrait "FK_XXX" on table "BB"."
> error.
>
> how can I achive to post the BB before committing transaction1??
>
> I hope I could explain the stuation??

I think you can do this by doing both in Transaction 1. Why do you need 2
transactions?

Benno




To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/






------------------------------------------------------------------
Virus taramasi yapildi. Scanned for Viruses. [19/02/2003 - 16:14]


[Non-text portions of this message have been removed]



To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/



[Non-text portions of this message have been removed]



To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/






------------------------------------------------------------------
Virus taramasi yapildi. Scanned for Viruses. [19/02/2003 - 16:58]


[Non-text portions of this message have been removed]


Yahoo! Groups Sponsor
ADVERTISEMENT




To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


[Non-text portions of this message have been removed]



To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/






------------------------------------------------------------------
Virus taramasi yapildi. Scanned for Viruses. [19/02/2003 - 18:15]


[Non-text portions of this message have been removed]