in reply to Yet Another Stored Procedure Question

MS-SQL (and Sybase) stored procedures can return three types of data: Output from SELECT statements are returned the normal way, and you normally just need to $sth->fetch() them.

OUTPUT parameters are handled in DBD::ODBC via bind_param_inout(). However, this will only work if the parameter has been declared OUTPUT in the stored procedure source - otherwise the server has no idea that it needs to return data for that parameter.

I'm not sure how to retrieve the return status with DBD::ODBC - it might be via the "call ..." syntax.

In your case the error message appears to indicate that your stored procedure doesn't define any OUTPUT parameters, so bind_param_inout) fails.

Michael

  • Comment on Re: Yet Another Stored Procedure Question