Execute an oracle Function that returns a reference cursor in C#

后端 未结 3 601
不知归路
不知归路 2021-01-17 15:15

I have an oracle package with a procedure that has a in out reference cursor. My understanding is that this is pretty standard.

What I didn\'t like is the fact that

3条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-17 16:05

    I have not tested this with a function, but for my stored procedures. I specify the out parameter for the refCursor.

    command.Parameters.Add(new OracleParameter("refcur_questions", OracleDbType.RefCursor, ParameterDirection.Output));
    

    If you are able to get the function to work with the CommandType.Text. I wonder if you can try adding the parameter above except with the direction as:

    ParameterDirection.ReturnValue
    

    I am using Oracle.DataAccess version 2.111.6.0

提交回复
热议问题