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

Hi, I used the Win32::ODBC , SQL function like this
$sqlstatement = "EXECUTE TestProcedure " . hash-name $db->Sql($sqlstatement);
but i get an error message. i also tried using the Run function instead of the Sql function, but no difference What am i doing wrong ? Does Perl not supprt connecting to Microsoft SQL Server 7 ?
  • Comment on RE: Re: Sending a hash to a stored proc

Replies are listed 'Best First'.
(Ovid - need more complete posting information) Sending a hash to a stored proc
by Ovid (Cardinal) on Sep 25, 2000 at 19:48 UTC
    Perl, using the DBI module, connects quite well to MS SQL Server 7 (as does Win32::ODBC). Perhaps if you were to tell us what your error message is and post a more extensive code snippet? Maybe your code above is pseudo-code, but hash-name is a bareword and the minus sign "-" embedded in it is going to cause Perl to want to interpolate those barewords as scalars.

    Cheers,
    Ovid

    Update: It looks like an error message was posted, but the site appears to be having problems today and I couldn't see it.

    Join the Perlmonks Setiathome Group or just go the the link and check out our stats.