[erlang-questions] odbc module invoking stored procedure with OUT params

Yash Ganthe <>
Thu Aug 29 14:45:36 CEST 2013


Hi,

We have a DB2 stored proc that takes OUT params and returns a CURSOR so that our Erlang module can get a List of records using the odbc module.

We invoke the stored proc using the code:
Params = [{{sql_varchar, 40}, out, [[]]},{{sql_varchar, 40}, out, [[]]}].
{selected, Results}  =  odbc:param_query(Ref,"call SP_NAME(?,?)",Params).

However, when we execute the stored proc, the OUT params get set with a value that indicates that the proc execution is successful, but no records are fetched from the cursor into the list. The output of param_query is :
{executed,2,[{"00000","NO ERROR"}]}

Can you suggest what needs to be done to read the OUT params as well as the records from the stored proc results?

Thanks,
Yash




DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130829/cfc4ecc5/attachment.html>


More information about the erlang-questions mailing list