Yeah MS SQL is special and doens't like to run multiple statements at once. I have a more general solution to the problem though.
1. Rather than using a globals, I ask a special function for my DB handles. It handles it's own caching which is nice for MS SQL but probably redundant otherwise. If all the handles have $dbh->{Kids} set, then it creates a new handle otherwise it reuses an old one.
2. I try hard to avoid having multiple SQL statements per subroutine. This ensures that there is one call to my special function per statement.
The end result is I have to pay for connecting multple times. However I don't pay too much and my code feels cleaner.
In reply to Re: MS SQL problem
by flogic
in thread MS SQL problem
by Win
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |