'Declaration Public Shadows Function CreateCommand() As DB2Command
public new DB2Command CreateCommand()
Return Value
A DB2Command object.
'Declaration Public Shadows Function CreateCommand() As DB2Command
public new DB2Command CreateCommand()
public void CreateDB2Command(string myConnString) { DB2Connection db2Connection = new DB2Connection(myConnString); DB2Command db2Command = db2Connection.CreateCommand(); db2Command.CommandText = "INSERT INTO DEPT VALUES (50,'Development','Philadelphia')"; db2Connection.Open(); try { db2Command.ExecuteNonQuery(); } finally { db2Connection.Close(); } }
Public Sub CreateDB2Command(ByVal myConnString As String) Dim db2Connection As New DB2Connection(myConnString) Dim db2Command As DB2Command = db2Connection.CreateCommand() db2Command.CommandText = "INSERT INTO DEPT VALUES (50,'Development','Philadelphia')" db2Connection.Open() Try db2Command.ExecuteNonQuery() Finally db2Connection.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