Bewerken

Delen via


OracleCommandBuilder.DeriveParameters(OracleCommand) Method

Definition

Retrieves parameter information from the stored procedure specified in the OracleCommand and populates the Parameters collection of the specified OracleCommand object.

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)

Parameters

command
OracleCommand

The OracleCommand referencing the stored procedure from which the parameter information is to be derived. The derived parameters are added to the Parameters collection of the OracleCommand.

Exceptions

The command text is not a valid stored procedure name, or the CommandType specified was not StoredProcedure.

Remarks

DeriveParameters overwrites any existing parameter information for the OracleCommand.

DeriveParameters requires an extra call to the database to obtain the information. If the parameter information is known in advance, it is more efficient to populate the parameters collection by setting the information explicitly.

You can only use DeriveParameters with stored procedures. You cannot use DeriveParameters to populate the OracleParameterCollection with arbitrary Transact-SQL statements, such as a parameterized SELECT statement.

For more information, see Configuring Parameters and Parameter Data Types.

Applies to