in reply to UPDATE not working with MS SQL Server

What does

my $sth = $dbh -> prepare("UPDATE vac_balance SET carry_over = ? WHERE + employee_id = ?") or die $dbh->errstr; $sth -> execute($carry_over, $employee_id) or die $dbh->errstr;
say?

Replies are listed 'Best First'.
Re^2: UPDATE not working with MS SQL Server
by Perobl (Beadle) on Nov 04, 2011 at 16:36 UTC

    I spotted my problem ... of course, after I posted here.

    The code shared in my post is clean. The problem is in my SQL schema. There was a field name mismatch.

    All is working fine now.

      It's good practice to use the die statement, especially with databases, as it probably would have informed you of a bad column name.

        Or set RaiseError, which would make it die automatically in case of error...