'Declaration Public Shadows Function CreateCommand() As MagentoCommand
public new MagentoCommand CreateCommand()
Return Value
A MagentoCommand object.
'Declaration Public Shadows Function CreateCommand() As MagentoCommand
public new MagentoCommand CreateCommand()
public void CreateMagentoCommand(string myConnString) { MagentoConnection magentoConnection = new MagentoConnection(myConnString); MagentoCommand magentoCommand = magentoConnection.CreateCommand(); magentoCommand.CommandText = "INSERT INTO Customers (email, firstname, lastname) VALUES ('[email protected]', 'John', 'Smith')"; magentoConnection.Open(); try { magentoCommand.ExecuteNonQuery(); } finally { magentoConnection.Close(); } }
Public Sub CreateMagentoCommand(ByVal myConnString As String) Dim magentoConnection As New MagentoConnection(myConnString) Dim magentoCommand As MagentoCommand = magentoConnection.CreateCommand() magentoCommand.CommandText = "INSERT INTO Customers (email, firstname, lastname) VALUES ('[email protected]', 'John', 'Smith')" magentoConnection.Open() Try magentoCommand.ExecuteNonQuery() Finally magentoConnection.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