When I run the below code using ManagedDataAccess nuget package (v19.6.0), it throws an index out of bounds exception. How do I retrieve the return value in the update statement?
var sql = "UPDATE SOMETABLE SET LAST_UPDATED = SYSDATE WHERE ID = 123 RETURNING INFO INTO :un";
OracleCommand cmd = new OracleCommand(sql, dbConn);
OracleParameter un = new OracleParameter(":un", OracleDbType.Varchar2, 30);
un.Direction = ParameterDirection.ReturnValue;
cmd.Parameters.Add(un);
dbConn.Open();
cmd.ExecuteNonQuery();
INFO isĀ a varchar2(30) column. I get the same error when using the Core version of the nuget package (V2.19.60).
If I use System.Data.OracleClient and replace OracleDbType.Varchar2 with OracleType.Varchar, which is deprecated, and run the same code as above, it works just fine.
Any help is greatly appreciated!