SqlParameter prmReturnValue = new SqlParameter("@ReturnValue", SqlDbType.Int);
prmReturnValue.Direction = ParameterDirection.ReturnValue;
cmdOCC.Parameters.Add(prmReturnValue);
prmReturnValue.Value = 0;
connOCC.Open();
cmdOCC.ExecuteNonQuery();
int rValue = System.Convert.ToInt32(prmReturnValue.Value);
connOCC.Close();

解决方案 »

  1.   

    你能不能在存储过程中,将数值型的输出参数放入游标中!
    比如
    returnvalue number open ref_cursor for 'select '||returnvalue||' ,col1,col2.... from yourtable ';这样你通过取游标也可以得到returnvalue.
      

  2.   

    ORA-01060 array binds or executes not allowedCause: The client application attempted to bind an array of cursors or attempted to repeatedly execute against a PL/SQL block with a bind variable of type cursor.
    Action: Bind a single cursor or execute the PL/SQL block one.
      

  3.   

    在pl/sql中已经通过了,只是在程序中不行
      

  4.   

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/daab-rm.asp
      

  5.   

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconusingstoredprocedureswithcommand.asphttp://expert.csdn.net/Expert/topic/1663/1663976.xml?temp=.380047
      

  6.   

    使用数组必须先进行初始化,而且数组只能在oracle的procedure之间作为参数。
      

  7.   

    其实不管什么存储过程,无非有input,output,returnvalue和返回result的参数。
    在c#里面的用法原理都一样。