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 |