I'd be surprised if $dbh->do("use $database") didn't work. Did you try it and have it fail?
...roboticus
When your only tool is a hammer, all problems look like your thumb.
In reply to Re^3: 'use database' for sqlserver
by roboticus
in thread 'use database' for sqlserver
by fionbarr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |