dotConnect for Zoho Desk Documentation
Devart.Data.ZohoDesk Namespace / ZohoDeskCommand Class / ZohoDeskCommand Constructor / ZohoDeskCommand Constructor(String,ZohoDeskConnection)
The text of the query.
A ZohoDeskConnection object that represents the connection to Zoho Desk.
Example

ZohoDeskCommand Constructor(String,ZohoDeskConnection)
Initializes a new instance of the ZohoDeskCommand class with the text of the query and a %% object.
Syntax
'Declaration
 
Public Function New( _
   ByVal commandText As String, _
   ByVal connection As ZohoDeskConnection _
)
 

Parameters

commandText
The text of the query.
connection
A ZohoDeskConnection object that represents the connection to Zoho Desk.
Remarks
The following table shows initial property values for an instance of ZohoDeskCommand.
Properties Initial value
CommandText commandText
CommandTimeout 30
CommandType System.Data.CommandType.Text
Connection connection
Example
The following example creates a ZohoDeskCommand and sets some of its properties.
public void CreateCommand()
{
  ZohoDeskConnection ZohoDeskConnection = new ZohoDeskConnection(
      Refresh Token=1000.a6fde76542bfbb5244a7e539d4390e72.87e34ea57023c2d0e7dcb9ce55e3e7f);
  string mySelectQuery = "SELECT * FROM Accounts";
  ZohoDeskCommand ZohoDeskCommand = new ZohoDeskCommand(mySelectQuery, ZohoDeskConnection);
  ZohoDeskCommand.FetchSize = 100;
}
Public Sub CreateCommand()
  Dim ZohoDeskConnection As New ZohoDeskConnection( _
    Refresh Token=1000.a6fde76542bfbb5244a7e539d4390e72.87e34ea57023c2d0e7dcb9ce55e3e7f)
  Dim mySelectQuery As String = _
    "SELECT * FROM Accounts"
  Dim ZohoDeskCommand As New ZohoDeskCommand(mySelectQuery, ZohoDeskConnection)
  ZohoDeskCommand.FetchSize = 100
End Sub
Requirements

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

See Also