'Declaration Public Shadows Function CreateCommand() As DynamicsCommand
public new DynamicsCommand CreateCommand()
Return Value
A DynamicsCommand object.
'Declaration Public Shadows Function CreateCommand() As DynamicsCommand
public new DynamicsCommand CreateCommand()
public void CreateDynamicsCommand(string myConnString) { DynamicsConnection dynamicsConnection = new DynamicsConnection(myConnString); DynamicsCommand dynamicsCommand = dynamicsConnection.CreateCommand(); dynamicsCommand.CommandText = "INSERT INTO Contact (FirstName,LastName) VALUES ('John','Smith')"; dynamicsConnection.Open(); try { dynamicsCommand.ExecuteNonQuery(); } finally { dynamicsConnection.Close(); } }
Public Sub CreateDynamicsCommand(ByVal myConnString As String) Dim dynamicsConnection As New DynamicsConnection(myConnString) Dim dynamicsCommand As DynamicsCommand = dynamicsConnection.CreateCommand() dynamicsCommand.CommandText = "INSERT INTO Contact (FirstName,LastName) VALUES ('John','Smith')" dynamicsConnection.Open() Try dynamicsCommand.ExecuteNonQuery() Finally dynamicsConnection.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