CreateCommand Method (ZohoDeskConnection)
Creates and returns a
ZohoDeskCommand object associated with the
ZohoDeskConnection.
In this sample
ZohoDeskCommand object is created. It is automatically associated with
ZohoDeskConnection that created it.
public void CreateZohoDeskCommand(string myConnString)
{
ZohoDeskConnection ZohoDeskConnection = new ZohoDeskConnection(myConnString);
ZohoDeskCommand ZohoDeskCommand = ZohoDeskConnection.CreateCommand();
ZohoDeskCommand.CommandText = "INSERT INTO Accounts (\"Account Name\", Phone) VALUES ('Test','555-555-555')";
ZohoDeskConnection.Open();
try
{
ZohoDeskCommand.ExecuteNonQuery();
}
finally
{
ZohoDeskConnection.Close();
}
}
Public Sub CreateZohoDeskCommand(ByVal myConnString As String)
Dim ZohoDeskConnection As New ZohoDeskConnection(myConnString)
Dim ZohoDeskCommand As ZohoDeskCommand = ZohoDeskConnection.CreateCommand()
ZohoDeskCommand.CommandText = "INSERT INTO Accounts (\"Account Name\", Phone) VALUES ('Test','555-555-555')"
ZohoDeskConnection.Open()
Try
ZohoDeskCommand.ExecuteNonQuery()
Finally
ZohoDeskConnection.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