2

out パラメータを持つ Oracle ストアド プロシージャの使用に問題があります。実際のストアド プロシージャを表示するアクセス権はありませんが、メソッド シグネチャは次のとおりです。

CHECKPASSWORDUSED (System.Decimal USER_IN, System.String PASSWORD_IN, out System.Decimal PW_FAIL)

そして、これが私がそれを呼ぼうとしている方法です。

public decimal CheckIfPasswordUsed(long userId, string password)
{
    decimal? used;
    _context.CHECKPASSWORDUSED(userId, password, out used);
    return Convert.ToDecimal(used);
}

out 変数を定義する必要がありましたが、これを正しく使用しているかどうかわかりません。私は正しい軌道に乗っていますか?

編集:私が得るエラーメッセージは次のとおりです:

[OracleException (0x80004005): ORA-06550: 行 2、列 3:
PLS-00201: 識別子 'CHECK_PASSWORD_USED' を宣言する必要があります
ORA-06550: 行 2、列 3:
PL/SQL: ステートメントは無視されました]
Devart.Data.Oracle。 bc.d() +872
Devart.Data.Oracle.an.i() +112
Devart.Data.Oracle.an.c() +3016
Devart.Data.Oracle.xa(Int32 A_0, bt A_1) +3343
Devart .Data.Oracle.OracleCommand.InternalExecute(CommandBehavior 動作、IDisposable ディスポーザブル、Int32 startRecord、Int32 maxRecords、Boolean nonQuery) +4880
Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior 動作、Boolean nonQuery) +764
Devart.Data.Oracle.OracleCommand. ExecuteNonQuery() +69
Devart.Data.Linq.Provider.DataProvider.ExecuteQuery (CompiledQuery コンパイルされたクエリ、オブジェクト [] 親引数、オブジェクト [] ユーザー引数、オブジェクト lastResult) +3675

4

1 に答える 1

2

I have discovered the answer!

Since this is my first time using Oracle I was unaware of 'Synonyms'. I had the dba create a synonym for the stored procedure and now I'm rocking and rolling!

For anyone interested you can read more about it here:

http://www.techonthenet.com/oracle/synonyms.php http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_7001.htm

于 2013-10-24T14:13:25.063 に答える