http://qs321.pair.com?node_id=503996


in reply to Getting MSSQL message return on DBI

The reason you get this error is because of the statement "use Northwind" the solution:
1) execute that statement in a separate statement handle
-- OR BETTER --
2) use fully qualified statements ( which is the most correct and you should ALWAYS do ;-) Fully qualified means to do something like
select A.[Column Name] from [Database Name].[owner].[Table Name] A
Most applications like SQL Query Analyzer parse the use statement out for you and that is why you might think it is ok to use.
JamesNC