dotConnect for QuickBooks Online Documentation
Devart.Data.QuickBooks Namespace / QuickBooksConnection Class / QuickBooksConnection Constructor / QuickBooksConnection Constructor(String)
The connection used to connect to QuickBooks Online.
Example

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

    Parameters

    connectionString
    The connection used to connect to QuickBooks Online.
    Remarks
    When a new instance of QuickBooksConnection 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 QuickBooksConnection.
    public void CreateQuickBooksConnection()
    {
      string myConnString = 
          "Company Id=1440905870;Refresh Token=AB11590759756UCO8O6CpRQcAMP00sIANafgS8Y4RN10rpLJNM;Token Server=file://D:\\temp\\QuickBooksToken.txt";
      QuickBooksConnection quickBooksConnection = new QuickBooksConnection(myConnString);
      quickBooksConnection.Open();
      //Do something
      quickBooksConnection.Close();
    }
    Public Sub CreateQuickBooksConnection()
      Dim myConnString As String = _
          "Company Id=1440905870;Refresh Token=AB11590759756UCO8O6CpRQcAMP00sIANafgS8Y4RN10rpLJNM;Token Server=file://D:\\temp\\QuickBooksToken.txt"
      Dim quickBooksConnection As New QuickBooksConnection(myConnString)
      quickBooksConnection.Open()
      'Do something
      quickBooksConnection.Close()
    End Sub
    See Also