I don't think i'm doing this right because my result is -1
I'm trying to launch a simple stored procedure, that doesn't require any input, and just display the results.
Heres the code
Thanks
I'm trying to launch a simple stored procedure, that doesn't require any input, and just display the results.
Heres the code
Code:
use DBI;
use DBD::ODBC;
my $server = "ServerName";
my $db = "DBName";
my $username = "xxxxxx";
my $password = "xxxxxxx";
my $dbh = DBI->connect("DBI:ODBC:$server","$username","$password") or die;
$dbh->do("use $db");
$query = ("exec dbo.GetMenuDBExport");
my $sth = $dbh->prepare($query);
my ($test) = $sth->execute() or die ("Can't Execute" . $sth->errstr());
print $test;
Thanks