How to return oracle output parameters from a stored procedure in .NET

后端 未结 2 968
孤城傲影
孤城傲影 2020-12-01 14:39

I am having serious issues trying to get the data back from the SP. I was trying to do it like this:

OracleCommand ora_cmd = new OracleCommand(\"a6r1.PR_ABC         


        
2条回答
  •  时光取名叫无心
    2020-12-01 15:07

    It seems you cannot use existing variable as output parameter, try this way instead

    ora_cmd.Parameters.Add("Lc_Exito", OracleDbType.Int32).Direction = ParameterDirection.Output;
    
    ora_cmd.ExecuteNonQuery();
    
    if (ora_cmd.Parameters["Lc_Exito"].value == 0)
    

提交回复
热议问题