// カーソルを取得 private void ResetCursor() { if (cursor != null) { cursor.Dispose(); } command.CommandText = "BEGIN OPEN :1 FOR SELECT * FROM (" + Sql + "); end;"; OracleParameter p_rc = command.Parameters.Add( "p_rc", OracleDbType.RefCursor, DBNull.Value, ParameterDirection.Output); command.ExecuteNonQuery(); command.Parameters.Clear(); cursor = p_rc.Value as OracleRefCursor; }