CreateCommand Method (ZohoConnection)
Creates and returns a
ZohoCommand object associated with the
ZohoConnection.
In this sample
ZohoCommand object is created. It is automatically associated with
ZohoConnection that created it.
public void CreateZohoCommand(string myConnString)
{
ZohoConnection zohoConnection = new ZohoConnection(myConnString);
ZohoCommand zohoCommand = zohoConnection.CreateCommand();
zohoCommand.CommandText = "INSERT INTO Accounts (\"Account Name\", Phone) VALUES ('Test','555-555-555')";
zohoConnection.Open();
try
{
zohoCommand.ExecuteNonQuery();
}
finally
{
zohoConnection.Close();
}
}
Public Sub CreateZohoCommand(ByVal myConnString As String)
Dim zohoConnection As New ZohoConnection(myConnString)
Dim zohoCommand As ZohoCommand = zohoConnection.CreateCommand()
zohoCommand.CommandText = "INSERT INTO Accounts (\"Account Name\", Phone) VALUES ('Test','555-555-555')"
zohoConnection.Open()
Try
zohoCommand.ExecuteNonQuery()
Finally
zohoConnection.Close()
End Try
End Sub