dotConnect for Zoho Books Documentation
Devart.Data.ZohoBooks Namespace / ZohoBooksCommand Class / ZohoBooksCommand Constructor / ZohoBooksCommand Constructor(String,ZohoBooksConnection)
The text of the query.
A ZohoBooksConnection object that represents the connection to Zoho Books.
Example

In This Topic
    ZohoBooksCommand Constructor(String,ZohoBooksConnection)
    In This Topic
    Initializes a new instance of the ZohoBooksCommand class with the text of the query and a %% object.
    Syntax
    'Declaration
     
    Public Function New( _
       ByVal commandText As String, _
       ByVal connection As ZohoBooksConnection _
    )
    public ZohoBooksCommand( 
       string commandText,
       ZohoBooksConnection connection
    )

    Parameters

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