This documentation is archived and is not being maintained.

OracleCommand Constructor ()

.NET Framework 1.1
Note: This namespace, class, or member is supported only in version 1.1 of the .NET Framework.

Initializes a new instance of the OracleCommand.

[Visual Basic]
Public Sub New()
public OracleCommand();
public: OracleCommand();
public function OracleCommand();


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


[Visual Basic, C#, C++] The following example creates an OracleCommand and sets some of its properties.

[Visual Basic] 
Public Sub CreateMyOracleCommand()
    Dim myCommand As New OracleCommand()
    myCommand.CommandType = CommandType.Text
End Sub

public void CreateMyOracleCommand() 
   OracleCommand myCommand = new OracleCommand();
   myCommand.CommandType = CommandType.Text;

 void CreateMyOracleCommand() 
    OracleCommand* myCommand = new OracleCommand();
    myCommand->CommandType = CommandType::Text;

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

.NET Framework Security: 

See Also

OracleCommand Class | OracleCommand Members | System.Data.OracleClient Namespace | OracleCommand Constructor Overload List