dotConnect for FreshBooks Documentation
Devart.Data.FreshBooks Namespace / FreshBooksCommand Class / FreshBooksCommand Constructor / FreshBooksCommand Constructor(String,FreshBooksConnection)
The text of the query.
A FreshBooksConnection object that represents the connection to FreshBooks.
Example

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

Parameters

commandText
The text of the query.
connection
A FreshBooksConnection object that represents the connection to FreshBooks.
Remarks
The following table shows initial property values for an instance of FreshBooksCommand.
Properties Initial value
CommandText commandText
CommandTimeout 30
CommandType System.Data.CommandType.Text
Connection connection
Example
The following example creates a FreshBooksCommand and sets some of its properties.
public void CreateCommand()
{
  FreshBooksConnection freshbooksConnection = new FreshBooksConnection(
      "API Version=Alpha;Access Token=3d3355b2beea67f9241400fbe28f0b116e3efd2f8a85dda3c35620acdc95cd60;Refresh Token=75836f50da63fc5bf81bb24598511ae131ea422e73d9f321b4c4a44e2dd1c67f;Company Name=Devart");
  string mySelectQuery = "SELECT * FROM Client";
  FreshBooksCommand freshbooksCommand = new FreshBooksCommand(mySelectQuery, freshbooksConnection);
  freshbooksCommand.FetchSize = 100;
}
Public Sub CreateCommand()
  Dim freshbooksConnection As New FreshBooksConnection( _
    "API Version=Alpha;Access Token=3d3355b2beea67f9241400fbe28f0b116e3efd2f8a85dda3c35620acdc95cd60;Refresh Token=75836f50da63fc5bf81bb24598511ae131ea422e73d9f321b4c4a44e2dd1c67f;Company Name=Devart")
  Dim mySelectQuery As String = _
    "SELECT * FROM Client"
  Dim freshbooksCommand As New FreshBooksCommand(mySelectQuery, freshbooksConnection)
  freshbooksCommand.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