如何在.net中获取Oracle输出变量数据
我正在使用ODP.net在.net中与Oracle合作。我想知道调用存储过程时如何从out变量中获取变量 我现在拥有的是如何在.net中获取Oracle输出变量数据,.net,oracle,output-parameter,.net,Oracle,Output Parameter,我正在使用ODP.net在.net中与Oracle合作。我想知道调用存储过程时如何从out变量中获取变量 我现在拥有的是 using(IDataReader reader = defaultDB.ExecuteReader("CalledStoredProc", new object[]{"InputVar", "OutPutVar"})) { //Display the rows for the reader. DisplayRowVals(reader); } 如果你们有任
using(IDataReader reader = defaultDB.ExecuteReader("CalledStoredProc", new object[]{"InputVar", "OutPutVar"}))
{
//Display the rows for the reader.
DisplayRowVals(reader);
}
如果你们有任何建议,我将不胜感激。谢谢
Derek实际上,您使用Cursor类型的附加参数调用存储过程,该参数具有输出方向 存储过程填充光标,然后在DAL中迭代(现在已修改)参数
DbCommand command = db.GetStoredProcCommand( sprocName );
command.Parameters.Add( new OracleParameter( "out_value", OracleDbType.Int32, ParameterDirection.Output ) );
db.ExecuteNonQuery( command );