InfiniteLoop has asked for the wisdom of the Perl Monks concerning the following question:

Greetings Monks,
 I have installed DBD::ODBC and have setup FreeTDS driver, via unixodbc, to connect to a MS SQL server. Here is my simple test code to execute a stored procedure:
use DBI; my $DSN = 'driver=FreeTDS;Server=mssql_server; database=test;uid=user; +pwd=password;'; my $dbh = DBI->connect("dbi:ODBC:$DSN") or die "$DBI::errstr\n"; my $sth = $dbh->prepare('EXEC sp_who'); $sth->execute();
While executing this code, I get the error:
 DBD::ODBC::st execute failed: (DBD: st_execute/SQLExecute err=-1)
I have searched the monastory and found a few questions, such as MS SQL Stored Procedure Syntax, however there didn't seem to be any conclusive answers.

How do I execute stored procedure against a MS SQl server, using DBD::ODBC ? Although Im not able to execute a stored procedure, other SQL queries work. Thanks.