'Declaration Public Overloads Shadows Function CreateCommand() As OracleCommand
public new OracleCommand CreateCommand()
Return Value
A OracleCommand object.
'Declaration Public Overloads Shadows Function CreateCommand() As OracleCommand
public new OracleCommand CreateCommand()
public void CreateOracleCommand(string myConnString) { OracleConnection myConnection = new OracleConnection(myConnString); OracleCommand myCommand = myConnection.CreateCommand(); myCommand.CommandText = "INSERT INTO DEPT VALUES (50,'Development','Philadelphia')"; myConnection.Open(); try { myCommand.ExecuteNonQuery(); } finally { myConnection.Close(); } }
Public Sub CreateOracleCommand(ByVal myConnString As String) Dim myConnection As New OracleConnection(myConnString) Dim myCommand As OracleCommand = myConnection.CreateCommand() myCommand.CommandText = "INSERT INTO DEPT VALUES (50,'Development','Philadelphia')" myConnection.Open() Try myCommand.ExecuteNonQuery() Finally myConnection.Close() End Try End Sub
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2