Edit

Share via


OracleCommand Constructors

Definition

Initializes a new instance of the OracleCommand.

Overloads

OracleCommand()

Initializes a new instance of the OracleCommand.

OracleCommand(String)

Initializes a new instance of the OracleCommand class with the text of the query.

OracleCommand(String, OracleConnection)

Initializes a new instance of the OracleCommand class with the text of the query and an OracleConnection object.

OracleCommand(String, OracleConnection, OracleTransaction)

Initializes a new instance of the OracleCommand class with the text of the query, an OracleConnection object, and an OracleTransaction.

OracleCommand()

Initializes a new instance of the OracleCommand.

public:
 OracleCommand();
public OracleCommand();
Public Sub New ()

Remarks

The base constructor initializes all fields to their default values. The following table shows initial property values for an instance of OracleCommand.

Properties Initial Value
CommandText empty string ("")
CommandType Text
Connection null

See also

Applies to

OracleCommand(String)

Initializes a new instance of the OracleCommand class with the text of the query.

public:
 OracleCommand(System::String ^ commandText);
public OracleCommand(string commandText);
new System.Data.OracleClient.OracleCommand : string -> System.Data.OracleClient.OracleCommand
Public Sub New (commandText As String)

Parameters

commandText
String

The text of the query.

See also

Applies to

OracleCommand(String, OracleConnection)

Initializes a new instance of the OracleCommand class with the text of the query and an OracleConnection object.

public:
 OracleCommand(System::String ^ commandText, System::Data::OracleClient::OracleConnection ^ connection);
public OracleCommand(string commandText, System.Data.OracleClient.OracleConnection connection);
new System.Data.OracleClient.OracleCommand : string * System.Data.OracleClient.OracleConnection -> System.Data.OracleClient.OracleCommand
Public Sub New (commandText As String, connection As OracleConnection)

Parameters

commandText
String

The text of the query.

connection
OracleConnection

An OracleConnection object that represents the connection to a database.

See also

Applies to

OracleCommand(String, OracleConnection, OracleTransaction)

Initializes a new instance of the OracleCommand class with the text of the query, an OracleConnection object, and an OracleTransaction.

public:
 OracleCommand(System::String ^ commandText, System::Data::OracleClient::OracleConnection ^ connection, System::Data::OracleClient::OracleTransaction ^ tx);
public OracleCommand(string commandText, System.Data.OracleClient.OracleConnection connection, System.Data.OracleClient.OracleTransaction tx);
new System.Data.OracleClient.OracleCommand : string * System.Data.OracleClient.OracleConnection * System.Data.OracleClient.OracleTransaction -> System.Data.OracleClient.OracleCommand
Public Sub New (commandText As String, connection As OracleConnection, tx As OracleTransaction)

Parameters

commandText
String

The text of the query.

connection
OracleConnection

An OracleConnection object that represents the connection to a database.

tx
OracleTransaction

The OracleTransaction in which the OracleCommand executes.

Remarks

The following table shows initial property values for an instance of this implementation of the OracleCommand.

Properties Initial Value
CommandText cmdText
CommandType Text
Connection A new OracleConnection that is the value for the connection parameter.

You can change the value for any of these parameters by setting the related property.

See also

Applies to