[freetds] begin atomic in procedures

Petr ZEMAN petrz at aswsyst.cz
Thu Nov 24 09:10:29 EST 2005


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.ibiblio.org/pipermail/freetds/attachments/20051124/192e4a70/attachment.bin


More information about the FreeTDS mailing list