Save Big on Cyber Monday! Up to 40% Off
ends in   {{days}}
Days
{{timeFormat.hours}}
:
{{timeFormat.minutes}}
:
{{timeFormat.seconds}}

Getting Started With dotConnect for QuickBooks Online

Below are some resources to help you maximize your experience with dotConnect for QuickBooks Online.

dotConnect for QuickBooks Online is a high-performance ADO.NET data provider with ORM support that offers fast, encrypted access to QuickBooks Online data for application development.

  • EF Core, Dapper, NHibernate ORM support
  • Local SQL engine with support for SQL-92
  • Compatibility with various .NET platforms and versions
  • Full compliance with ADO.NET
  • Integration with Visual Studio

Code examples

using Devart.Data.QuickBooks;

namespace QuickBooksConsoleApp
{
    class Program
    {
        static void Main(string[] args)
        {
            string connectionString = "Authentication Type=OAuthInteractive;" +
                                    "License key=**********;";

            try
            {
                using (QuickBooksConnection quickBooksConnection = new QuickBooksConnection())
                {
                    quickBooksConnection.ConnectionString = connectionString;
                    quickBooksConnection.Open();

                    Console.WriteLine("Connected to QuickBooks Online successfully.");

                    quickBooksConnection.Close();
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
            Console.ReadKey();
        }
    }
}
PM> Install-Package Devart.Data.QuickBooks
using Devart.Data.QuickBooks;

namespace QuickBooksConsoleApp
{
    class Program
    {
        static void Main(string[] args)
        {

            bool sandbox = true;
            string clientId = "YOUR_CLIENT_ID";
            string clientSecret = "YOUR_CLIENT_SECRET";

            string connectionString = $"Authentication Type=OAuthInteractive;" +
                                      $"Sandbox={sandbox};" +
                                      $"Client Id={clientId};" +
                                      $"Client Secret={clientSecret};" +
                                      "License key=**********";

            try
            {
                using (QuickBooksConnection quickBooksConnection = new QuickBooksConnection(connectionString))
                {
                    quickBooksConnection.Open();
                    Console.WriteLine("Connected to QuickBooks Online successfully.");
                    quickBooksConnection.Close();
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("An error occurred:");
                Console.WriteLine(ex.Message);
            }
        }
    }
}
PM> Install-Package Devart.Data.QuickBooks
using Devart.Data.QuickBooks;

namespace QuickBooksConsoleApp
{
    class Program
    {
        static void Main(string[] args)
        {
            string connectionString = "Authentication Type=OAuthInteractive;" +
                                      "License key=**********;";

            try
            {
                using (QuickBooksConnection quickBooksConnection = new QuickBooksConnection())
                {
                    quickBooksConnection.ConnectionString = connectionString;
                    quickBooksConnection.Open();

                    Console.WriteLine("Connected to QuickBooks Online successfully.");

                    string query = "SELECT Id, Name, FullyQualifiedName, Description FROM Account";

                    using (QuickBooksCommand command = new QuickBooksCommand(query, quickBooksConnection))
                    {
                        using (QuickBooksDataReader reader = command.ExecuteReader())
                        {
                            if (reader.HasRows)
                            {
                                Console.WriteLine("Fetching Account data:");
                                Console.WriteLine("--------------------------------------------------");

                                while (reader.Read())
                                {
                                    string id = reader["Id"]?.ToString() ?? "N/A";
                                    string name = reader["Name"]?.ToString() ?? "N/A";
                                    string fullyQualifiedName = reader["FullyQualifiedName"]?.ToString() ?? "N/A";
                                    string description = reader["Description"]?.ToString() ?? "N/A";

                                    Console.WriteLine($"Id: {id}");
                                    Console.WriteLine($"Name: {name}");
                                    Console.WriteLine($"FullyQualifiedName: {fullyQualifiedName}");
                                    Console.WriteLine($"Description: {description}");
                                    Console.WriteLine("--------------------------------------------------");
                                }
                            }
                            else
                            {
                                Console.WriteLine("No data found in the Account table.");
                            }
                        }
                    }

                    quickBooksConnection.Close();
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
            Console.ReadKey();
        }
    }
}
PM> Install-Package Devart.Data.QuickBooks
using Microsoft.EntityFrameworkCore;

namespace QuickBooksConsoleApp
{
    class Program
    {
        static void Main(string[] args)
        {
            using (var context = new Model())
            {
                try
                {
                    var accounts = context.Accounts
                        .Select(a => new {
                            Name = a.Name,
                            Classification = a.Classification,
                            AccountType = a.AccountType
                        })
                        .Take(10)
                        .ToList();

                    foreach (var account in accounts)
                    {
                        Console.WriteLine($"Name: {account.Name}");
                        Console.WriteLine($"Classification: {account.Classification}");
                        Console.WriteLine($"Account type: {account.AccountType}");
                        Console.WriteLine(new string('-', 20));
                    }
                }
                catch (Exception ex)
                {
                    Console.WriteLine($"An error occurred: {ex.Message}");
                }
            }
        }
    }
}
PM> Install-Package Devart.Data.QuickBooks.EFCore
using System.Data;
using Devart.Data.QuickBooks;

namespace QuickBooksConsoleApp
{
    class Program
    {
        static void Main(string[] args)
        {
            string connectionString = "Authentication Type=OAuthInteractive;" +
                                      "License key=**********;";

            try
            {
                using (QuickBooksConnection connection = new QuickBooksConnection(connectionString))
                {
                    connection.Open();
                    Console.WriteLine("Connected to QuickBooks Online successfully.");

                    LoadCustomers(connection);
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("An error occurred:");
                Console.WriteLine(ex.Message);
            }

            Console.WriteLine("Press any key to exit...");
            Console.ReadKey();
        }

        static void LoadCustomers(QuickBooksConnection connection)
        {
            Console.WriteLine("\n=== Loading Customers ===");

            try
            {
                // Create command to select customers
                string selectCommand = "SELECT Id, DisplayName, FullyQualifiedName FROM Customer";

                using (QuickBooksDataAdapter adapter = new QuickBooksDataAdapter(selectCommand, connection))
                {
                    // Create DataSet to hold the data
                    DataSet dataSet = new DataSet();

                    // Fill DataSet with customers data
                    int recordCount = adapter.Fill(dataSet, "Customers");

                    Console.WriteLine($"Loaded {recordCount} customers:");

                    // Display the data
                    foreach (DataRow row in dataSet.Tables["Customers"].Rows)
                    {
                        Console.WriteLine($"ID: {row["Id"]}, Name: {row["DisplayName"]}, Company: {row["FullyQualifiedName"]}");
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine($"Error loading customers: {ex.Message}");
            }
        }
    }
}
PM > Install-Package Devart.Data.QuickBooks

How-to articles

.NET Connection Strings for QuickBooks Online
Learn how to set up connection strings properly when working with dotConnect for QuickBooks Online in .NET applications.
Connect to QuickBooks Online in .NET With C#
Explore how to establish a connection between .NET applications and QuickBooks Online using ADO.NET.
Connect to QuickBooks Online with EF Core
Find out how to connect QuickBooks Online to your application using EF Core and ADO.NET.
Connect to QuickBooks Online in Blazor
Learn how to connect your ASP.NET Core Blazor application to QuickBooks Online: A complete guide for developers with code examples and best practices.
Connect to QuickBooks Online in MAUI
See how to build .NET MAUI applications and perform CRUD operations with QuickBooks Online using ADO.NET.

Documentation

Licensing
Licensing
A detailed technical reference on embedding license information - a required resource for applications built with dotConnect for QuickBooks Online.
DataAdapter Features
DataAdapter features
A guide to using the QuickBooksDataAdapter class for interacting with QuickBooks Online data in a disconnected architecture.
Parameters
Parameters
An overview of SQL query parameters and their synchronization, along with practical insights into working with stored procedures.
SQL translation
SQL translation
Since remote execution is significantly faster than client-side processing, using translatable SQL ensures optimal query performance.

dotConnect Universal

Get universal access to data from a variety of sources, including SQL Server, Oracle, PostgreSQL, MySQL, SQLite, DB2, InterBase, Microsoft Access, and Firebird. Other servers can be accessed through their ADO.NET, OLE DB and ODBC providers.

FAQ

What is the trial period for dotConnect for QuickBooks Online?
dotConnect for QuickBooks Online offers a fully functional 30-day trial. During this period, you can use and evaluate all features without limitations. After the trial ends, you can purchase a license to keep using the product.
Why do I need to install the product if NuGet is available?

dotConnect for QuickBooks Online provides two sets of assemblies, and the choice depends on your project type:

  • For .NET (.NET Core/.NET 5+) projects: Use the assemblies available via NuGet packages.
  • For .NET Framework projects: Use the Devart assemblies included with the product installer.
Where should I apply my License Key?

The method for applying your license depends on your project type:

  • For .NET (.NET Core/.NET 5+) projects, apply the License Key at runtime using the License Key connection string parameter.
  • For .NET Framework projects, no license key is necessary. Download and install the licensed version of dotConnect from your Devart Customer Portal.
Do end users of my application need a Devart license, or do I have to pay additional fees for deploying my software?

No, end users do not need a Devart license, and there are no additional deployment fees, as long as you hold a valid Devart license.

According to the EULA, you're allowed to redistribute the following runtime assemblies with your application:

  • Devart.Data.QuickBooks.dll
  • Devart.Data.dll

You can include them in your app's folder (such as Bin for web apps) or register them in the GAC. Just make sure to use them in your solution only.

There's no need for a full installation on the target machine, you can also use the "Minimal installation" option provided by the setup. It does not disturb any other dotConnect components.

How can I update dotConnect to a new version?

To update dotConnect to a new version, you need to reinstall it:

  • 1. Open Settings > Apps > Installed apps in Windows.
  • 2. Uninstall the current and any older versions of dotConnect, including Entity Developer and LinqConnect, if installed.
  • 3. Visit the Customer Portal and download the latest licensed version.
  • 4. Install the downloaded version and receive the latest features and improvements.
How can I completely remove all previous versions of a product?

1. Go to Settings > Apps > Installed apps and uninstall:

  • All dotConnect providers
  • Entity Developer
  • LinqConnect

2. Manually delete any leftover files from the following locations (if they exist):

GAC folders:

  • C:\Windows\assembly\GAC_MSIL
  • C:\Windows\Microsoft.NET\assembly\GAC_MSIL

Program files and extensions:

  • C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\Extensions\Devart
  • C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\Extensions\Devart
  • C:\Program Files (x86)\Devart
  • C:\Program Files\Devart
  • C:\Program Files (x86)\Common Files\Devart
  • C:\Program Files\Common Files\Devart

Program data folders:

  • C:\ProgramData\Devart\dotConnect
  • C:\ProgramData\Devart\Entity Developer
  • C:\ProgramData\Devart\EntityDeveloper

Removing these ensures a clean system and prevents conflicts during future installations.

Wield the full firepower of dotConnect for QuickBooks Online
Go with the advanced edition of dotConnect for QuickBooks Online and stay at the top of your game from day one!