Help for this page

Select Code to Download


  1. or download this
    $dbh->do('exec sp_MyStoredProg @foo=' . $dbh->quote($bar));
    
  2. or download this
    $bar=~s/'/''/g;
    $dbh->do("exec sp_MyStoredProg \@foo='$bar'");
    
  3. or download this
    my $sth=$dbh->prepare('exec sp_MyStoredProg @foo=?');
    $sth->execute($bar);
    
  4. or download this
    DBD::ODBC::st execute failed: [Microsoft][ODBC SQL Server Driver][SQL 
    +Server]Line 1: Incorrect syntax near 's'. (SQL-37000)
    [Microsoft][ODBC SQL Server Driver][SQL Server]Unclosed quotation mark
    + before the character string '.... (SQL-37000)(DBD: st_execute/SQLExe
    +cute err=-1) at testdiff.pl line 113.