Skip to Content.
Sympa Menu

freetds - Re: [freetds] begin atomic in procedures

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Petr ZEMAN <petrz AT aswsyst.cz>
  • To: freetds AT lists.ibiblio.org
  • Subject: Re: [freetds] begin atomic in procedures
  • Date: Thu, 24 Nov 2005 15:10:29 +0100

Thank you for your help.

I solved the problem by setting:
SET TEMPORARY OPTION CHAINED = 'ON'
I have to call commit after each procedure,
but it works without problems.

--
Regards
Petr ZEMAN

> It sounds like it might be from one connection being in autocommit mode, and
> the other not. In autocommit mode when you do an update, it is implicitly
> committed immediately. That is a usual cause for transaction handling
> differences between clients.
>
> http://sybooks.sybase.com/onlinebooks/group-sasarc/awg0702e/dbugen7/@Generic
> __BookTextView/30474
>
> > CREATE PROCEDURE test()
> > BEGIN
> > begin atomic
> > message 'Entered Inner';
> > update test set id=id+1;
> > exception
> > when others then
> > message 'Error INNER', @@error,' text: ', errormsg();
> > message 'Leaving Inner';
> > end;
> > END
> >
> > When I call test() from sybase interactive sql, all is ok.
> > When I call it from php via freetds, ends with:
> > Error -267: COMMIT/ROLLBACK not allowed within atomic operation

Attachment: pgp8_CSgXSHqm.pgp
Description: PGP signature




Archive powered by MHonArc 2.6.24.

Top of Page