in reply to Re^3: how to call stored procedure from ms sql
in thread how to call stored procedure from ms sql

1. the ms sql stored procedure is posted in my comment. it does work. 2. there's no error at the prepare statement, the error is at Database error: Can't call method "bind_param" on an undefined value 3. ways tried: $sql = q{ BEGIN :rv := sp_updateStorageSystem(parameter1_in => ?, parameter2_in => ? ); END; }; a) $sth = $dbh->prepare( $sql ) or die $dbh->errstr; b) $sth = $dbh->prepare( "exec sp_updateStorageSystem" ) or die $dbh->errstr; c) $sth = $dbh->prepare( "begin sp_updateStorageSystem end;" ) or die $dbh->errstr; 4. using dbd::odbc how does bind_param works?
  • Comment on Re^4: how to call stored procedure from ms sql

Replies are listed 'Best First'.
Re^5: how to call stored procedure from ms sql
by jhourcle (Prior) on Apr 26, 2005 at 01:42 UTC

    The error message that you are saying happened : Can't call method "bind_param" on an undefined value will only occur, to the best of my knowledge, when the prepare fails, and does not return a statement handle.

    The other possibility is that the statement handle has gone out of scope. Did you declare the scope of the statement handle before you entered the eval block? (this is one of those things that 'use strict' is rather good at catching)

    update:: paragraph 1 conflicted w/ paragraph 2