'Declaration Public Shadows Function CreateCommand() As FreshBooksCommand
public new FreshBooksCommand CreateCommand()
Return Value
A FreshBooksCommand object.
'Declaration Public Shadows Function CreateCommand() As FreshBooksCommand
public new FreshBooksCommand CreateCommand()
public void CreateFreshBooksCommand(string myConnString) { FreshBooksConnection freshbooksConnection = new FreshBooksConnection(myConnString); FreshBooksCommand freshbooksCommand = freshbooksConnection.CreateCommand(); freshbooksCommand.CommandText = "INSERT INTO Client (Email, FirstName, LastName) VALUES ('[email protected]', 'John', 'Smith')"; freshbooksConnection.Open(); try { freshbooksCommand.ExecuteNonQuery(); } finally { freshbooksConnection.Close(); } }
Public Sub CreateFreshBooksCommand(ByVal myConnString As String) Dim freshbooksConnection As New FreshBooksConnection(myConnString) Dim freshbooksCommand As FreshBooksCommand = freshbooksConnection.CreateCommand() freshbooksCommand.CommandText = "INSERT INTO Client (Email, FirstName, LastName) VALUES ('[email protected]', 'John', 'Smith')" freshbooksConnection.Open() Try freshbooksCommand.ExecuteNonQuery() Finally freshbooksConnection.Close() End Try End Sub