Output parameters of stored procedures are sent as a special resultset in the tds stream to the client.
DBD::Sybase and freetds should be able to manage output parameters.
The DBD::Sybase documentation has a good explanation on how to use output parameters of stored procedures. | [reply] |
A few things I've run into that might help:
1. To get this working I had to use DBD::Sybase 0.91, not the latest version. I was using FreeTDS 0.53, haven't tried this with 0.60.
2. That configuration does not support bind parameters at all. You have to do the 'bad thing' and build your query string outside the DBD call. Hopefully FreeTDS 0.60 supports the newer version of DBD::Sybase that supports bind parameters. I'm hoping to get a chance to play with it next month.
3. Microsoft SQL Server stored procedures can return multiple result sets from a single call, and support for this is iffy. Try testing with a stored procedure that you know will only return one result set.
Good Luck!
-- Spring: Forces, Coiled Again!
| [reply] |
There was some discussion recently on the freetds mailing list about how to handle OUTPUT parameters from stored procedures when talking to MS-SQL. I don't remember exactly what the problem was, but you may want to check the archives of the freetds mailing list (should be linked from the FreeTDS site)
Michael
| [reply] |