It definately should lock records involved in a transaction. It is the most important purpose of transactions. There are only 2 reasons it wouldn't do locking during your transaction.

1. your Transaction Isolation Level. You may need to modify the Transaction Isolation Level above 'READ COMMITED'. BTW running at lower levels is bad.

2. This all goes out the window though if your DBD doesn't use SQLServer transactions and impliments it's own. I don't know what DBD you're using, but this should be easy to verify. You can read the DBD or rewrite your sql to include 'BEGIN TRANSACTION;' at the beginning of your first statement and ';COMMIT TRANSACTION;' at the end of your last. This way you know that the SQLServer transactions are called. Then test it out.

UPDATE: Clarify things a little



grep
One dead unjugged rabbit fish later

In reply to Re^5: Appending text to a column in SQL by grep
in thread Appending text to a column in SQL by sgifford

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.