dotConnect for Zoho CRM Documentation
Devart.Data.Zoho Namespace / ZohoCommand Class / ZohoCommand Constructor / ZohoCommand Constructor(String,ZohoConnection)
The text of the query.
A ZohoConnection object that represents the connection to Zoho CRM.
Example

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

Parameters

commandText
The text of the query.
connection
A ZohoConnection object that represents the connection to Zoho CRM.
Remarks
The following table shows initial property values for an instance of ZohoCommand.
Properties Initial value
CommandText commandText
CommandTimeout 30
CommandType System.Data.CommandType.Text
Connection connection
Example
The following example creates a ZohoCommand and sets some of its properties.
public void CreateCommand()
{
  ZohoConnection zohoConnection = new ZohoConnection(
      "API Version=V2;Refresh Token=1000.a6fde76542bfbb5244a7e539d4390e72.87e34ea57023c2d0e7dcb9ce55e3e7f3;ClientId=1000.M4FJLKYTSED90LJHUTVMKKAA432RUK;ClientSecret=89a0ed79957808814cdb20b9765423efffa767d1d0");
  string mySelectQuery = "SELECT * FROM Accounts";
  ZohoCommand zohoCommand = new ZohoCommand(mySelectQuery, zohoConnection);
  zohoCommand.FetchSize = 100;
}
Public Sub CreateCommand()
  Dim zohoConnection As New ZohoConnection( _
    "API Version=V2;Refresh Token=1000.a6fde76542bfbb5244a7e539d4390e72.87e34ea57023c2d0e7dcb9ce55e3e7f3;ClientId=1000.M4FJLKYTSED90LJHUTVMKKAA432RUK;ClientSecret=89a0ed79957808814cdb20b9765423efffa767d1d0")
  Dim mySelectQuery As String = _
    "SELECT * FROM Accounts"
  Dim zohoCommand As New ZohoCommand(mySelectQuery, zohoConnection)
  zohoCommand.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