in reply to Error message puzzle

This is actually an error message passed from SQL Server, rather than Perl or DBI. The stored procedure you're using has some of it's paramaters as type int, but it's getting a string.

This might be solved by using placeholders in your query, eg:

$var1 = 'text'; $var2 = 1; $var3 = $foo; $Query = "EXEC $Stored_procedure ?, ?, ?"; my $sthB_A = $dbh->prepare($Query) or die "Couldn't prepare query: ". +$dbh->errstr; $sthB_A->execute($var1, $var2, $var3) or die "Couldn't execute query: +".$sthB_A->errstr;
The execute will then figure out what needs to be quoted, etc.