Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Implict transaction on a trigger

3 posts in Trigger Last posting was on 2007-05-04 15:28:58.0Z
Paul Man Posted on 2007-04-12 15:10:39.0Z
From: "Paul Man" <paulman@datasoft.ie>
Newsgroups: advantage.trigger
Subject: Implict transaction on a trigger
Date: Thu, 12 Apr 2007 16:10:39 +0100
Lines: 12
Organization: DSoft
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3028
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
NNTP-Posting-Host: 82.141.233.142
Message-ID: <461e4b1d@solutions.advantagedatabase.com>
X-Trace: 12 Apr 2007 09:07:09 -0700, 82.141.233.142
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!82.141.233.142
Xref: solutions.advantagedatabase.com Advantage.Trigger:331
Article PK: 1136400

I have a database transaction that updates two table. one table has a
trigger that updates the second table again. By default the implicit
transaction option was checked and I got record locks on each insert.

By removing the implicit transaction there is no lock. however what I am
curious about from the documentation is the nett effect on the second table
if the database transaction is rolled back. Will the second table record go
back to the way it was prior to the update in the transaction followed by
the update in the trigger? The documentation seems to give the impression
that the behaviour is undefined.


Paul Man Posted on 2007-04-12 15:55:24.0Z
From: "Paul Man" <paulman@datasoft.ie>
Newsgroups: advantage.trigger
References: <461e4b1d@solutions.advantagedatabase.com>
Subject: Re: Implict transaction on a trigger
Date: Thu, 12 Apr 2007 16:55:24 +0100
Lines: 23
Organization: DSoft
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3028
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
NNTP-Posting-Host: 82.141.233.142
Message-ID: <461e5599@solutions.advantagedatabase.com>
X-Trace: 12 Apr 2007 09:51:53 -0700, 82.141.233.142
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!82.141.233.142
Xref: solutions.advantagedatabase.com Advantage.Trigger:332
Article PK: 1136401

Removing implicit transactions doesn't remove the lock error 5035.
Table B reporting the lock, is closed prior to updating table A which
executes the trigger also updating Table B.
Why is the record locked in the same transaction? Surely within a database
transaction I should be able to update that table and further update it by a
trigger fired from another table?

"Paul Man" <paulman@datasoft.ie> wrote in message
news:461e4b1d@solutions.advantagedatabase.com...
>I have a database transaction that updates two table. one table has a
>trigger that updates the second table again. By default the implicit
>transaction option was checked and I got record locks on each insert.
>
> By removing the implicit transaction there is no lock. however what I am
> curious about from the documentation is the nett effect on the second
> table if the database transaction is rolled back. Will the second table
> record go back to the way it was prior to the update in the transaction
> followed by the update in the trigger? The documentation seems to give
> the impression that the behaviour is undefined.
>