dotConnect for FreshBooks Documentation
Devart.Data.FreshBooks Namespace / FreshBooksConnection Class / FreshBooksConnection Constructor / FreshBooksConnection Constructor(String)
The connection used to connect to FreshBooks.
Example

In This Topic
    FreshBooksConnection Constructor(String)
    In This Topic
    Initializes a new instance of the FreshBooksConnection class when given a string containing the connection string.
    Syntax
    'Declaration
     
    Public Function New( _
       ByVal connectionString As String _
    )
    public FreshBooksConnection( 
       string connectionString
    )

    Parameters

    connectionString
    The connection used to connect to FreshBooks.
    Remarks
    When a new instance of FreshBooksConnection is created, the read/write properties are set to the following initial values unless they are specifically set using their associated keywords in the ConnectionString property.
    Example
    The following example creates and opens a FreshBooksConnection.
    public void CreateFreshBooksConnection()
    {
      string myConnString = 
          "API Version=Alpha;Access Token=3d3355b2beea67f9241400fbe28f0b116e3efd2f8a85dda3c35620acdc95cd60;Refresh Token=75836f50da63fc5bf81bb24598511ae131ea422e73d9f321b4c4a44e2dd1c67f;Company Name=Devart";
      FreshBooksConnection freshbooksConnection = new FreshBooksConnection(myConnString);
      freshbooksConnection.Open();
      //Do something
      freshbooksConnection.Close();
    }
    Public Sub CreateFreshBooksConnection()
      Dim myConnString As String = _
          "API Version=Alpha;Access Token=3d3355b2beea67f9241400fbe28f0b116e3efd2f8a85dda3c35620acdc95cd60;Refresh Token=75836f50da63fc5bf81bb24598511ae131ea422e73d9f321b4c4a44e2dd1c67f;Company Name=Devart"
      Dim freshbooksConnection As New FreshBooksConnection(myConnString)
      freshbooksConnection.Open()
      'Do something
      freshbooksConnection.Close()
    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