OracleCommandBuilder.DeriveParameters(OracleCommand) 方法

定義

從指定於 的 OracleCommand 儲存程序中取得參數資訊,並填充 Parameters 指定 OracleCommand 物件的集合。

public:
 static void DeriveParameters(System::Data::OracleClient::OracleCommand ^ command);
public static void DeriveParameters(System.Data.OracleClient.OracleCommand command);
static member DeriveParameters : System.Data.OracleClient.OracleCommand -> unit
Public Shared Sub DeriveParameters (command As OracleCommand)

參數

command
OracleCommand

參考 OracleCommand 參數資訊所依據的儲存程序。 導出參數會加入 Parameters 的集合 OracleCommand中。

例外狀況

指令文本並非有效的儲存程序名稱,或CommandTypeStoredProcedure指定的 。

備註

DeriveParameters覆蓋任何現有的參數資訊。OracleCommand

DeriveParameters 需要額外呼叫資料庫才能取得資訊。 若參數資訊事先已知,則透過明確設定資訊來填充參數集合會更有效率。

你只能用 DeriveParameters 儲存程序。 你不能用 DeriveParameters 來填充 OracleParameterCollection 中任意的 Transact-SQL 陳述句,例如參數化的 SELECT 陳述句。

欲了解更多資訊,請參閱 「參數與參數資料型態的配置」。

適用於