dotConnect for QuickBooks Documentation
Devart.Data.QuickBooks Namespace / QuickBooksConnection Class / QuickBooksConnection Constructor / QuickBooksConnection Constructor()
Example

In This Topic
    QuickBooksConnection Constructor()
    In This Topic
    Initializes a new instance of the QuickBooksConnection class.
    Syntax
    'Declaration
     
    Public Function New()
    public QuickBooksConnection()
    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()
    {
      QuickBooksConnection quickBooksConnection = new QuickBooksConnection();
      quickBooksConnection.ConnectionString = 
          "Company Id=1440905870;Refresh Token=AB11590759756UCO8O6CpRQcAMP00sIANafgS8Y4RN10rpLJNM;Token Server=file://D:\\temp\\QuickBooksToken.txt";
      quickBooksConnection.Open();
      //Do something
      quickBooksConnection.Close();
    }
    Public Sub CreateQuickBooksConnection()
      Dim quickBooksConnection As New QuickBooksConnection()
      quickBooksConnection.ConnectionString = _ 
          "Company Id=1440905870;Refresh Token=AB11590759756UCO8O6CpRQcAMP00sIANafgS8Y4RN10rpLJNM;Token Server=file://D:\\temp\\QuickBooksToken.txt"
      quickBooksConnection.Open()
      'Do something
      quickBooksConnection.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