in reply to MS SQL problem

This is a pure guess without knowing what $Command contains, but....

Since you're not fetching results after the first execute, I'm guessing you're not expecting any (an insert or update or some such). In that case, you can use $dbh->do($Command) instead of prepare/execute, which will make sure the connection is ready for the next query.

Also, since you say it used to work, the change may let you see whether the command is returning a result set unexpectedly (such as if you're calling a stored procedure that has changed unbeknownst to you).