I don't think your problem is with Sybase::DBlib, which is just an interface to DB-Library, so much as in your transaction management logic.

It's been about a year since I worked with Transact-SQL, but I think the error in your "query 3" is causing the transaction to roll back; therefore, the updates following it are not done as part of the original transaction, and thus the rollback has no effect. Check the transactions reference in the Sybase manuals to see if your error will cause automatic rollback.

To get around the problem, you may want to check your $status variable before even initiating the update. Hard to say without knowing the structure of the rest of your code.


In reply to Re: Sybperl - Problem with Handling Transactions with Commit and Rollback by VSarkiss
in thread Sybperl - Problem with Handling Transactions with Commit and Rollback by cool_ravi2

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.