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 |