'Declaration Public Shadows Function CreateCommand() As SugarCommand
public new SugarCommand CreateCommand()
Return Value
A SugarCommand object.
'Declaration Public Shadows Function CreateCommand() As SugarCommand
public new SugarCommand CreateCommand()
public void CreateSugarCommand(string myConnString) { SugarConnection sugarConnection = new SugarConnection(myConnString); SugarCommand sugarCommand = sugarConnection.CreateCommand(); sugarCommand.CommandText = "INSERT INTO Campaigns (name, campaign_type, end_date, status) VALUES ('Sale campaign', 'Email', '2016-12-12', 'Active')"; sugarConnection.Open(); try { sugarCommand.ExecuteNonQuery(); } finally { sugarConnection.Close(); } }
Public Sub CreateSugarCommand(ByVal myConnString As String) Dim sugarConnection As New SugarConnection(myConnString) Dim sugarCommand As SugarCommand = sugarConnection.CreateCommand() sugarCommand.CommandText = "INSERT INTO Campaigns (name, campaign_type, end_date, status) VALUES ('Sale campaign', 'Email', '2016-12-12', 'Active')" sugarConnection.Open() Try sugarCommand.ExecuteNonQuery() Finally sugarConnection.Close() End Try End Sub