Dev Ar To DBC Dynamics BC
Dev Ar To DBC Dynamics BC
Table of Contents
Part I What's New 1
© 2025 Devart
I
II ODBC Driver for Dynamics 365 Business Central
8 Using
...................................................................................................................................
in OpenOffice and LibreOffice 101
9 Using
...................................................................................................................................
in PHP 111
10 Using
...................................................................................................................................
in Power BI 113
11 Using
...................................................................................................................................
in Python 114
12 Using
...................................................................................................................................
in QlikView 115
13 Using
...................................................................................................................................
in SSIS 120
14 Using
...................................................................................................................................
in Tableau 121
Index 0
© 2025 Devart
What's New 1
1 What's New
© 2015-2025
Devart. All Rights Request Support ODBC Forum Provide Feedback
Reserved.
2 General Information
1. Overview
2. Features
3. Compatibility
4. Requirements
5. Licensing
6. Getting Support
© 2015-2025
Devart. All Rights Request Support ODBC Forum Provide Feedback
Reserved.
2.1 Overview
Overview
Devart ODBC Driver for Dynamics 365 Business Central is a high-performance connectivity
solution with enterprise-level features for accessing Dynamics 365 Business Central
Customer Engagement (formerly known as Dynamics CRM) from ODBC-compliant
reporting, analytics, BI, and ETL tools on Windows, macOS, and Linux. Our ODBC driver fully
supports standard ODBC API functions and data types and enables easy and secure access
© 2025 Devart
2 ODBC Driver for Dynamics 365 Business Central
© 2015-2025
Devart. All Rights Request Support ODBC Forum Provide Feedback
Reserved.
© 2025 Devart
General Information 3
2.2 Features
Connection to Dynamics
WHERE conditions
Subqueries
GROUP statements
© 2025 Devart
4 ODBC Driver for Dynamics 365 Business Central
Aggregation functions
ORDER statements
and more.
Devart ODBC Driver for Dynamics 365 Moreover, with our driver you can perform
Business Central provides support for DML bulk updates to Dynamics 365 Business
(INSERT, UPDATE, DELETE) operations, Central by combining SQL statements into
which allows you to modify data in batches, thus simplifying and speeding up
Dynamics 365 Business Central in the large data modification with Dynamics 365
same way as in SQL databases. Business Central.
ODBC Conformance
© 2025 Devart
General Information 5
Central Compatibility
Integration
Advanced Data Conversion
© 2025 Devart
6 ODBC Driver for Dynamics 365 Business Central
High Performance
Support
2.3 Compatibility
Supported Platforms
Windows 32-bit and 64-bit (including Windows Terminal Server)
Compatible with all Windows versions (Windows Vista and higher) that support .NET
Framework 4.5.
© 2025 Devart
General Information 7
Adobe ColdFusion
Embarcadero Delphi & C++Builder
UniDAC, FireDAC, dbGo (ADO), BDE and dbExpress
FileMaker
Lazarus
Omnis Studio
PHP
PowerBASIC
Python
Database Management
DBArtisan
dbForge Studio
dBeaver
Informatica Cloud
RazorSQL
© 2025 Devart
8 ODBC Driver for Dynamics 365 Business Central
Alteryx
DBxtra
Dundas BI
MicroStrategy
Oracle BI
Power BI
Qlik Sense
QlikView
RStudio
SAS JMP
Tableau
TARGIT
TIBCO Spotfire
LibreOffice
© 2025 Devart
General Information 9
Microsoft Access
Microsoft Excel
OpenOffice
StarOffice
© 2015-2025
Devart. All Rights Request Support ODBC Forum Provide Feedback
Reserved.
2.4 Requirements
The following requirements must be met for ODBC Driver for Dynamics 365 Business
Central:
Only one version of ODBC Driver for Dynamics 365 Business Central is installed on your
system.
.NET Framework 4.5 or later is installed on your system.
© 2015-2025
Devart. All Rights Request Support ODBC Forum Provide Feedback
Reserved.
2.5 Licensing
--------------------------------------------------
INTRODUCTION
This Devart end-user license agreement ("Agreement") is a legal agreement between you
(either an individual person or a single legal entity) and Devart, for the use of the ODBC Driver
© 2025 Devart
10 ODBC Driver for Dynamics 365 Business Central
software application, demos, intermediate files, printed materials, and online or electronic
documentation contained in this installation file. For the purpose of this Agreement, the
software program(s) and supporting documentation will be referred to as the "Software".
LICENSE
1. GRANT OF LICENSE
The enclosed Software is licensed, not sold. You have the following rights and privileges,
subject to all limitations, restrictions, and policies specified in this Agreement.
1.1. If you are a legally licensed user, depending on the Software Edition specified in the
registration letter you have received from Devart upon purchase of the Software:
- the "Desktop Edition" allows you to install and use the Software on a single desktop
computer, provided it is accessed by no more than one person at a time, either directly or
remotely, for sole purposes only in accordance with this Agreement. If more than one person
can simultaneously use the computer where you plan to install the product, you must
purchase a Server License. A Desktop License is valid for one single desktop installation;
- the "Server Edition" allows you to install and use the Software on a single server, provided it
is accessed by more than one person at a time, either directly or remotely. This definition
includes, but is not limited to, Web servers, application servers, batch servers, and desktop
workstations, where more than one concurrent users can access the Software. A Server
License is valid for one single server installation, provided it is used by 1 (one) legal entity in
accordance with this Agreement.
1.2. If you are a legally licensed user, depending on the License Type specified in the
registration letter you have received from Devart upon purchase of the Software:
- the "Subscription-based License" allows you to install and use the Software on a single
computer only during the subscription term specified at purchase. An Internet connection is
required to activate the license and check the license status when the Software is used.
Once the subscription term is over, you will be able to either stop using the Software or renew
the license for a new subscription term;
- the "Perpetual License" allows you to install and use the specific Software product version
on a single computer without an active subscription. A subscription provides access to new
product releases, regular upgrades, and support for new server versions provided during the
subscription term;
© 2025 Devart
General Information 11
- the "Site License" allows you to install and use the Software on one or more computers in a
single company in accordance with this Agreement;
- the "OEM License" allows you to install and use the Software on one or more computers in
a single company as well as deploy the Software as part of a licensee's application to web
servers, application servers, batch servers, desktops, and other end-user devices. This
definition includes the ability to install and use the application containing the Software without
any additional fees in favor of the licensor.
1.3. If you are a legally licensed user of the Software, you are also entitled to:
- make one copy of the Software for archival purposes only, or copy the Software onto the
hard disk of your computer and retain the original for archival purposes;
- develop and test Applications with the Software, subject to the Limitations below.
1.4. If you have the "OEM License", you are also entitled to:
- deploy the Software to your end-user as a Software installation package or integrate it into
your Applications.
1.5. You are allowed to use evaluation versions of the Software as specified in the Evaluation
section.
2. LIMITATIONS
Only legally registered users are licensed to use the Software, subject to all of the conditions
of this Agreement. Usage of the Software is subject to the following restrictions.
2.1. You may not reverse engineer, decompile, or disassemble the Software.
2.2. You may not reproduce or distribute any Software documentation without express written
permission from Devart.
2.3. You may not distribute and sell any portion of the Software integrating it into your
Applications.
2.4. You may not transfer, assign, or modify the Software in whole or in part. In particular, the
Software license is non-transferable, and you may not transfer the Software installation
package.
© 2025 Devart
12 ODBC Driver for Dynamics 365 Business Central
2.5. You may not remove or alter any Devart's copyright, trademark, or other proprietary rights
notice contained in any portion of Devart files.
3. REDISTRIBUTION
The license grants you a non-exclusive right to reproduce any new software programs
(Applications) created using the Software. You cannot distribute the Software integrated into
your Applications unless you are an "OEM License" holder. Any Devart's files remain Devart's
exclusive property.
4. TRANSFER
You may not transfer the Software to any individual or entity without express written
permission from Devart. In particular, you may not share copies of the Software under
"Desktop License" with other co-developers without obtaining proper license of these copies
for each individual; you may not install the Software under "Server License" on more than 1
(one) server without obtaining proper license of these installations for each server.
5. TERMINATION
Devart may immediately terminate this Agreement without notice or judicial resolution in the
event of any failure to comply with any provision of this Agreement. Upon such termination
you must destroy the Software, all accompanying written materials, and all copies.
6. EVALUATION
Devart may provide evaluation ("Trial") versions of the Software. You may transfer or
distribute Trial versions of the Software as an original installation package only. If the Software
you have obtained is marked as a "Trial" version, you may install and use the Software for a
period of up to 30 calendar days from the date of installation (the "Trial Period"), subject to the
additional restriction that it is used solely for evaluation of the Software and not in conjunction
with the development or deployment of any application in production. You may not use
Applications developed using Trial versions of the Software for any commercial purposes.
Upon expiration of the Trial Period, the Software must be uninstalled, all its copies and all
accompanying written materials must be destroyed.
7. WARRANTY
The Software and documentation are provided "AS IS" without warranty of any kind. Devart
makes no warranties, expressed or implied, including, but not limited to, the implied
warranties of merchantability and fitness for a particular purpose or use.
© 2025 Devart
General Information 13
The Software is sold on a subscription basis. The Software subscription entitles you to
download improvements and enhancement from Devart's web site as they become available,
during the active subscription period. The initial subscription period is one year from the date
of purchase of the license. The subscription is automatically activated upon purchase, and
may be subsequently renewed by Devart, subject to receipt applicable fees. Licensed users
of the Software with an active subscription may request technical assistance with using the
Software over email from the Software development. Devart shall use its reasonable
endeavors to answer queries raised, but does not guarantee that your queries or problems
will be fixed or solved.
Devart reserves the right to cease offering and providing support for legacy Database
versions.
9. COPYRIGHT
The Software is confidential and proprietary copyrighted work of Devart and is protected by
international copyright laws and treaty provisions. You may not remove the copyright notice
from any copy of the Software or any copy of the written materials, accompanying the
Software.
This Agreement contains the total agreement between the two parties and supersedes any
other agreements, written, oral, expressed, or implied.
© 2015-2025
Devart. All Rights Request Support ODBC Forum Provide Feedback
Reserved.
This document lists several ways you can find help with using ODBC Driver for Dynamics
365 Business Central describes the Priority Support program.
Support Options
There are a number of resources for finding help on installing and using ODBC Driver for
Dynamics 365 Business Central:
You can find out more about ODBC Driver for Dynamics 365 Business Central installation
© 2025 Devart
14 ODBC Driver for Dynamics 365 Business Central
You can get community assistance and technical support on the Community Forum.
You can get advanced technical assistance by ODBC Driver for Dynamics 365 Business
Central developers through the ODBC Driver for Dynamics 365 Business Central Priority
Support program.
Subscriptions
The ODBC Driver for Dynamics 365 Business Central Subscription program is an annual
maintenance and support service for ODBC Driver for Dynamics 365 Business Central
users.
Users with a valid ODBC Driver for Dynamics 365 Business Central Subscription get the
following benefits:
Product support through the ODBC Driver for Dynamics 365 Business Central Priority
Support program
Access to new versions of ODBC Driver for Dynamics 365 Business Central when they are
released
Access to all ODBC Driver for Dynamics 365 Business Central updates and bug fixes
Priority Support
ODBC Driver for Dynamics 365 Business Central Priority Support is an advanced product
support service for getting expedited individual assistance with ODBC Driver for Dynamics
365 Business Central-related questions from the ODBC Driver for Dynamics 365 Business
Central developers themselves. Priority Support is carried out over email and has a two
business day response policy. Priority Support is available for users with an active ODBC
Driver for Dynamics 365 Business Central Subscription.
To get help through the ODBC Driver for Dynamics 365 Business Central Priority Support
program, please send an email to [email protected] describing the problem you are
having. Make sure to include the following information in your message:
Your ODBC Driver for Dynamics 365 Business Central Registration number.
© 2025 Devart
General Information 15
Full ODBC Driver for Dynamics 365 Business Central edition name and version number.
You can find the version number in DLL version information.
Versions of the Dynamics 365 Business Central server and client you are using.
If possible, ODBC Administrator Log, scripts for creating and filling in database objects, and
the application using ODBC Driver for Dynamics 365 Business Central.
If you have any questions regarding licensing or subscriptions, please see the FAQ or
contact [email protected]
© 2015-2025
Devart. All Rights Request Support ODBC Forum Provide Feedback
Reserved.
1. Installation
2. Product Activation
3. Connecting to Dynamics 365 Business Central
4. Connection String Parameters
5. Enabling ODBC Tracing
6. Supported Data Types
7. Supported ODBC API Functions
© 2015-2025
Devart. All Rights Request Support ODBC Forum Provide Feedback
Reserved.
3.1 Installation
ODBC Driver for Dynamics 365 Business Central currently supports Windows 32-bit and 64-
bit.
Regular Installation
Silent Installation
© 2015-2025
Request Support ODBC Forum Provide Feedback
Devart. All Rights
© 2025 Devart
16 ODBC Driver for Dynamics 365 Business Central
Reserved.
3.1.1 Windows
Installation on Windows
1. Download and run installer executive file.
3. In case you already have the specified installation folder on the PC or another Driver
version is installed, you will get a warning. Click Yes to overwrite the old files with the
4. On the Select Components page you can select whether to install the 64-bit version of the
driver or not. Clear the check box if you need no 64-bit installation. There is also a check
© 2025 Devart
Using ODBC Driver 17
box on this page, that allows you to select whether to install Help and Manual.
5. In the License Information dialog box, you should select the license type and activate the
product. If you have no activation key, you can select Trial and use the driver for evaluation
purposes.
6. If you have an activation key, select the Activation Key option. Copy the activation key from
the registration email or your Customer Portal account and paste it into the Activation Key
edit box.
© 2025 Devart
18 ODBC Driver for Dynamics 365 Business Central
7. If you have the activation key file, click the Load Activation Key button and browse to it.
8. Click Next.
© 2025 Devart
Using ODBC Driver 19
© 2015-2025
Devart. All Rights Request Support ODBC Forum Provide Feedback
Reserved.
3.1.2 Silent Windows
2. Use the following command-lines to perform the driver silent/very silent installation:
Note: The installation is performed by specifying the path to a license key file with any name.
When /SILENT is used, the installation progress is displayed, but no user interaction is
required during installation.
When /VERYSILENT is used, the installation wizard dialog is hidden and the installation
process is performed without user interference.
© 2015-2025
Devart. All Rights Request Support ODBC Forum Provide Feedback
Reserved.
One of the key advantages of Group Policy is the ability to deploy software remotely using MSI
files. This section explains how to use Group Policy to remotely install the ODBC Driver for
Dynamics 365 Business Central on client computers.
© 2025 Devart
20 ODBC Driver for Dynamics 365 Business Central
© 2015-2025
Devart. All Rights Request Support ODBC Forum Provide Feedback
Reserved.
3.2.1 Package Transformation
An MST file, or Windows Installer Setup Transform file, contains program configuration
settings. In our case, the MST file for the ODBC Driver for Dynamics 365 Business Central
will include the correct license information. This MST file is used together with the original MSI
package in the Group Policy software distribution system.
There are many tools available for customizing MSI file settings, so you can choose the one
that best suits your needs. In this example, we'll be using Orca, which is available as part of
the Windows SDK Components for Windows Installer Developers. For more information
about Orca, visit the official Microsoft website
To start the process of MST file generation using the Orca editor, follow the steps below:
1. Launch the Orca application, then open the required MSI file by selecting Open in the File
© 2025 Devart
Using ODBC Driver 21
The MSI file for the ODBC Driver for Salesforce is taken as an example to illustrate the Group
Policy installation process. Use the same steps described in this section when installing the
ODBC Driver for Dynamics 365 Business Central.
2. As a result, the Tables menu on the left side of the main application window will display the
© 2025 Devart
22 ODBC Driver for Dynamics 365 Business Central
4. To proceed, select Property from the Tables menu, then double-click any empty row on
In the Add Row dialog that opens, make the following settings and press OK to apply the
changes:
Property - enter ACTIVATIONKEY with capital letters only.
Value - enter the valid OEM license key for the ODBC Driver for Dynamics 365
Business Central.
As shown in the following screen, a new property, ACTIVATIONKEY, has been added, with
5. Once the configuration changes have been made, select Transform -> Generate
Transform.
© 2025 Devart
Using ODBC Driver 23
6. In the Save Transform As dialog that appears, enter a suitable name for the new MST file
window.
© 2025 Devart
24 ODBC Driver for Dynamics 365 Business Central
In case of a positive outcome, the newly created MST file will be located in the folder you
specified, alongside the MSI file.
© 2015-2025
Devart. All Rights Request Support ODBC Forum Provide Feedback
Reserved.
3.2.2 Deployment and Activation
© 2025 Devart
Using ODBC Driver 25
2. Set the appropriate sharing permissions on this folder to allow read access to the driver
3. Download the ODBC Driver for Dynamics 365 Business Central MSI file, and place it in the
network folder.
The MSI file for the ODBC Driver for Salesforce is taken as an example to illustrate the Group
Policy installation process. Use the same steps described in this section when installing the
ODBC Driver for Dynamics 365 Business Central.
Further in this section, you'll find more detailed information on how to deploy and activate the
ODBC Driver for Dynamics 365 Business Central on remote client computers using Group
Policy.
Server-Side Actions
1. Open the Group Policy Management desktop application.
2. In the Group Policy Management window, navigate to the desired forest node, then
expand the appropriate option under the Domains node. For this example, we'll select
devart-test.test. Right-click the Domains node, and from the context menu, select Create
© 2025 Devart
26 ODBC Driver for Dynamics 365 Business Central
3. You can now create a New Group Policy Object. In the New GPO dialog enter a name for
the new object and click OK. The new GPO will then appear within the Group Policy
Management container.
For example, let's create a GPO named after the ODBC driver name.
Keep in mind that each ODBC Driver for Dynamics 365 Business Central Windows
installation package corresponds to one Group Policy Object (GPO), which is important for
managing future software upgrades. To install multiple drivers using Group Policy, you need
to create a separate GPO for each driver you want to deploy.
© 2025 Devart
Using ODBC Driver 27
4. Right-click the new object and select Edit from the context menu.
5. In the left pane of the Group Policy Management Editor, navigate to Computer
Configuration --> Policies --> Software Settings --> Software installation. Your
current deployment package will appear in the right pane. Right-click Software
© 2025 Devart
28 ODBC Driver for Dynamics 365 Business Central
6. In the Group Policy Management Editor dialog that opens, select the desired MSI
© 2025 Devart
Using ODBC Driver 29
7. In the Deploy Software dialog, select Advanced to specify the software deployment
method. The Advanced deployment method allows you to make necessary modifications
8. In the Properties dialog of the installation package that opens, go to the Modifications tab
and select Add. Browse for the corresponding MST file, select it, and click Open to apply
the settings.
© 2025 Devart
30 ODBC Driver for Dynamics 365 Business Central
9. If configured correctly, the Group Policy Management Editor window should look as
follows:
Client-Side Actions
For the ODBC Driver for Dynamics 365 Business Central to be successfully installed on
remote client machines, all domain users must restart their computers after logging in for the
first time.
In case of successful deployment, the ODBC driver will be installed on the client's computer.
To verify, open the ODBC Data Source Administrator on the client's machine and add the
deployed ODBC driver.
© 2025 Devart
Using ODBC Driver 31
All information on the deployed driver is accessible upon clicking the About tab.
© 2025 Devart
32 ODBC Driver for Dynamics 365 Business Central
Similarly, the valid license key will be automatically activated after the successful installation
of the ODBC Driver for Dynamics 365 Business Central.
© 2025 Devart
Using ODBC Driver 33
See Also
Creating the MST File Using Orca
© 2015-2025
Devart. All Rights Request Support ODBC Forum Provide Feedback
Reserved.
3.2.3 Software Upgrade
© 2025 Devart
34 ODBC Driver for Dynamics 365 Business Central
2. Create a new MST file with a new license key using Orca.
If your license is still valid, there's no need to create a new MST file. Use the current MST file
instead.
The MSI file for the ODBC Driver for Salesforce is taken as an example to illustrate the Group
Policy installation process. Use the same steps described in this section when installing the
ODBC Driver for Dynamics 365 Business Central.
3. Follow the same workflow as outlined in Step 4 to Step 7 of the ODBC Driver for Dynamics
4. In the Properties dialog that appears after selecting the Advanced deployment method,
© 2025 Devart
Using ODBC Driver 35
Make sure to select the following check boxes while adding the package:
Current Group Policy Object
5. Browse for the corresponding GPO object and click OK to apply the settings.
© 2025 Devart
36 ODBC Driver for Dynamics 365 Business Central
6. Now the Upgrades tab of the Properties dialog will list a new package with a newer
version.
© 2025 Devart
Using ODBC Driver 37
7. Go to the Modifications tab in the same properties dialog, click Add and browse to the
MST file.
We have already created a new MST file with a new license key in Step 2.
© 2025 Devart
38 ODBC Driver for Dynamics 365 Business Central
8. In case of a positive outcome both the old and new versions of the driver package will be
Once the GPO configuration on the server is complete, the ODBC Driver for Dynamics 365
© 2025 Devart
Using ODBC Driver 39
Business Central will automatically update to the latest version each time a client computer
restarts.
Client-Side Actions
To update the ODBC Driver for Dynamics 365 Business Central to a newer version on
remote client machines, all domain users must restart their computers after their first login.
If successful, both the driver and the license key will be automatically updated to the new
version on remote computers. For detailed instructions on how to view the technical details of
the ODBC Driver for Dynamics 365 Business Central after upgrading, refer to Client-Side
Actions.
See Also
Creating the MST File Using Orca
© 2015-2025
Devart. All Rights Request Support ODBC Forum Provide Feedback
Reserved.
See how to activate Devart ODBC Driver for Dynamics 365 Business Central:
Obtaining Activation Key
Activation on Windows
© 2015-2025
Devart. All Rights Request Support ODBC Forum Provide Feedback
Reserved.
3.3.1 Obtaining Activation Key
© 2025 Devart
40 ODBC Driver for Dynamics 365 Business Central
See also:
Activation on Windows
© 2015-2025
Devart. All Rights Request Support ODBC Forum Provide Feedback
Reserved.
3.3.2 Activation on Windows
© 2025 Devart
Using ODBC Driver 41
3. In the appeared dialog box, select the installed driver, click Finish.
© 2025 Devart
42 ODBC Driver for Dynamics 365 Business Central
4. In the Driver Configuration dialog box, on the License tab, click the Input Activation Key
button.
© 2025 Devart
Using ODBC Driver 43
5. Copy the activation key from the registration email carefully and paste it into the Input
6. If you have the activation key file, click the Load Key button and browse to it.
7. Click OK.
© 2025 Devart
44 ODBC Driver for Dynamics 365 Business Central
© 2015-2025
Devart. All Rights Request Support ODBC Forum Provide Feedback
Reserved.
3.3.3 Where to See the License Information?
2. Open the System DSN tab and click the Add button
© 2025 Devart
Using ODBC Driver 45
© 2025 Devart
46 ODBC Driver for Dynamics 365 Business Central
See also
Product Activation
© 2015-2025
Devart. All Rights Request Support ODBC Forum Provide Feedback
Reserved.
This section describes how to connect to Dynamics 365 Business Central using ODBC
Driver for Dynamics 365 Business Central
1. Driver Configuration
2. Obtaining an Access Key
3. Obtaining a Refresh Token
© 2015-2025
Devart. All Rights Request Support ODBC Forum Provide Feedback
Reserved.
© 2025 Devart
Using ODBC Driver 47
2. Select the User DSN or System DSN tab. Most applications work with both types, yet
some applications require a specific type of DSN.
3. Click Add. The Create New Data Source dialog will appear.
4. Select Devart ODBC Driver for Dynamics 365 Business Central and click Finish. The
driver setup dialog will open.
5. Enter the connection information in the appropriate fields. Finally, click OK to save the
DSN.
Basic Authentication
If you choose this authentication type, enter the username and password for your Dynamics
365 Business Central account.
© 2025 Devart
48 ODBC Driver for Dynamics 365 Business Central
Token-Based Authentication
If you authenticate with OAuth2, click Sign in to Dynamics BC, enter your credentials, and
grant the requested permissions to generate a refresh token.
© 2025 Devart
Using ODBC Driver 49
For both authentication types, you may test the connectivity by clicking Test Connection.
See Also
Connection String Parameters
© 2025 Devart
50 ODBC Driver for Dynamics 365 Business Central
© 2015-2025
Devart. All Rights Request Support ODBC Forum Provide Feedback
Reserved.
3.4.2 Obtaining Connection Details - Basic
To start the process of obtaining a web service access key, follow the steps below:
1. Access the web client of your Dynamics 365 Business Central instance by logging in.
2. In the Search field, type users and select the Users page.
© 2025 Devart
Using ODBC Driver 51
4. Copy the existing Web Service Access Key or generate a new one instead.
© 2025 Devart
52 ODBC Driver for Dynamics 365 Business Central
5. Now, you can access your Dynamics 365 Business Central account data.
See Also
Configuring ODBC Driver for Dynamics 365 Business Central
© 2015-2025
Devart. All Rights Request Support ODBC Forum Provide Feedback
Reserved.
3.4.3 Obtaining Connection Details - OAuth 2.0
To start the process of generating a refresh token for the ODBC driver for Dynamics 365
Business Central, follow the steps below:
1. Run the ODBC Administrator utility and make proper settings in the driver's Configuration
dialog.
© 2025 Devart
Using ODBC Driver 53
3. Specify your credentials or select a different sign-in option to log in and click Next.
© 2025 Devart
54 ODBC Driver for Dynamics 365 Business Central
© 2025 Devart
Using ODBC Driver 55
If the process is successful, the refresh token will be automatically generated and inserted in
the corresponding field of the driver configuration window.
© 2025 Devart
56 ODBC Driver for Dynamics 365 Business Central
6. Finally, you can access your Dynamics 365 Business Central account data.
See Also
Configuring ODBC Driver for Dynamics 365 Business Central
© 2015-2025
Devart. All Rights Request Support ODBC Forum Provide Feedback
Reserved.
© 2025 Devart
Using ODBC Driver 57
Parameter Description
The authentication type to use when
connecting to Dynamics 365 Business
Central.
The possible values are:
Basic - The basic user/password
Authentication
authentication type.
OAuth 2.0 - The OAuth 2.0 authentication
type.
The URL of the Dynamics 365 Business
Server
Central server.
The Dynamics 365 Business Central
User ID username. Available when the User ID and
Password authentication type is selected.
© 2025 Devart
58 ODBC Driver for Dynamics 365 Business Central
Proxy Settings
Advances Settings
© 2025 Devart
Using ODBC Driver 59
© 2025 Devart
60 ODBC Driver for Dynamics 365 Business Central
© 2015-2025
Devart. All Rights Request Support ODBC Forum Provide Feedback
Reserved.
© 2025 Devart
Using ODBC Driver 61
If the ODBC client application you need to trace runs under Local System account or any
other user login than your own, select Machine-Wide tracing for all user identities. For
example, this option may be necessary for SSMS.
To generate a trace file using ODBC Source Administrator on Windows, follow the steps
below.
1. Type ODBC Data Sources in the Windows 10 search box (in earlier versions of Windows,
open Control Panel > Administrative Tools) and choose the application of the needed
bitness.
2. Select the Tracing tab.
3. If necessary, change the default Log File Path. Make sure that the path is writable by the
application, then click Apply.
4. Click Start Tracing Now.
5. Restart all application processes.
6. Click Test Connection in the DSN settings to make sure the driver is able to connect.
7. Reproduce the issue.
8. Click Stop Tracing Now on the Tracing tab.
9. Send us the obtained log file (for example, devart.log).
© 2025 Devart
62 ODBC Driver for Dynamics 365 Business Central
[ODBC]
Trace=Yes
TraceFile=/home/test/devart.log
Make sure to disable logging after obtaining a log file since it affects the read/write speed.
© 2015-2025
Devart. All Rights Request Support ODBC Forum Provide Feedback
Reserved.
The following table describes how the Dynamics 365 Business Central data types are
mapped to the ODBC data types.
© 2025 Devart
Using ODBC Driver 63
TIME SQL_TYPE_TIME
DATE SQL_TYPE_DATE
DATETIME SQL_TYPE_TIMESTAMP
GUID SQL_GUID
© 2015-2025
Devart. All Rights Request Support ODBC Forum Provide Feedback
Reserved.
For more information about the ODBC interface, see the ODBC Programmer's Reference.
ODBC Driver for Dynamics 365 Business Central supports all deprecated functions for
backward compatibility.
© 2025 Devart
64 ODBC Driver for Dynamics 365 Business Central
Connects to a
specific driver by
connection string or
requests that the
SQLDriverConnect ODBC
Driver Manager and
driver display
connection dialog
boxes for the user.
Obtains an
SQLAllocEnv Deprecated environment handle
allocated from driver.
Obtains a
SQLAllocConnect Deprecated
connection handle
Returns information
SQLGetInfo ISO 92 about a specific
driver and data
© 2025 Devart
Using ODBC Driver 65
source.
Returns the functions
SQLGetFunctions ISO 92 supported by the
driver.
Returns information
SQLGetTypeInfo ISO 92 about supported
data types.
© 2025 Devart
66 ODBC Driver for Dynamics 365 Business Central
Sets a statement
SQLSetStmtOption Deprecated
option
Returns the value of
SQLGetStmtOption Deprecated
a statement option
© 2025 Devart
Using ODBC Driver 67
Executes a
SQLExecDirect ISO 92
statement
Returns the text of an
SQL statement as
SQLNativeSql ODBC
translated by the
driver.
Returns the
description for a
SQLDescribeParam ODBC
specific parameter
in a statement.
Returns the number
SQLNumParams ISO 92 of parameters in a
statement.
Used in conjunction
with SQLPutData to
supply parameter
SQLParamData ISO 92
data at execution
time. (Useful for long
data values.)
Sends part or all of a
data value for a
SQLPutData ISO 92
parameter. (Useful
for long data values.)
© 2025 Devart
68 ODBC Driver for Dynamics 365 Business Central
an insert, update, or
delete request.
Returns the number
SQLNumResultCols ISO 92 of columns in the
result set.
Describes a column
SQLDescribeCol ISO 92
in the result set.
Describes attributes
SQLColAttribute ISO 92 of a column in the
result set.
Describes attributes
SQLColAttributes Deprecated of a column in the
result set.
Returns multiple
SQLFetch ISO 92
result rows.
Returns scrollable
SQLFetchScroll ISO 92
result rows.
Returns scrollable
SQLExtendedFetch Deprecated
result rows.
Positions a cursor
within a fetched
block of data and
enables an
SQLSetPos ODBC
application to refresh
data in the rowset or
to update or delete
data in the result set.
Performs bulk
SQLBulkOperations ODBC
insertions and bulk
© 2025 Devart
Using ODBC Driver 69
bookmark
operations, including
update, delete, and
fetch by bookmark.
© 2025 Devart
70 ODBC Driver for Dynamics 365 Business Central
associated
privileges for one or
more tables.
Returns the list of
SQLColumns X/Open column names in
specified tables.
Returns a list of
column names that
SQLForeignKeys ODBC make up foreign
keys, if they exist for
a specified table.
Returns the list of
column names that
SQLPrimaryKeys ODBC
make up the primary
key for a table.
Returns the list of
input and output
parameters, as well
SQLProcedureColu
ODBC as the columns that
mns
constitute the result
set for the specified
procedures.
Returns the list of
procedure names
SQLProcedures ODBC
stored in a specific
data source.
Returns information
SQLSpecialColumn
X/Open about the optimal set
s
of columns that
© 2025 Devart
Using ODBC Driver 71
uniquely identifies a
row in a specified
table, or the columns
that are
automatically
updated when any
value in the row is
updated by a
transaction.
Returns statistics
about a single table
SQLStatistics ISO 92 and the list of
indexes associated
with the table.
Returns a list of
tables and the
SQLTablePrivileges ODBC privileges
associated with
each table.
Returns the list of
table names stored
SQLTables X/Open
in a specific data
source.
© 2025 Devart
72 ODBC Driver for Dynamics 365 Business Central
back a transaction.
© 2025 Devart
Using ODBC Driver 73
environment handle.
© 2015-2025
Devart. All Rights Request Support ODBC Forum Provide Feedback
Reserved.
This section discusses how to use ODBC Driver for Dynamics 365 Business Central with
ODBC-compliant tools.
DBeaver
Microsoft Access
Microsoft Excel
PHP
Power BI
Python
QlikView
SSIS
Tableau
© 2015-2025
Devart. All Rights Request Support ODBC Forum Provide Feedback
Reserved.
DBeaver Overview
DBeaver is a free, open source multiplatform database management tool and SQL client for
developers and database administrators. DBeaver can be used to access any database or
© 2025 Devart
74 ODBC Driver for Dynamics 365 Business Central
cloud application that has an ODBC or JDBC driver, such as Oracle, SQL Server, MySQl,
Salesforce, or Mailchimp. DBeaver provides you with the most important features you'd need
when working with a database in a GUI tool, such as:
SQL queries execution
Data export/import
Data backup
DDL generation
ER diagrams rendering
BLOB/CLOB support
Scrollable resultsets
The tool comes in two editions — Community and Enterprise. Enterprise Edition supports
NoSQL databases, such as MongoDB or Cassandra, persistent query manager database,
SSH tunneling, vector graphics (SVG) and a few other enterprise-level features. Note though
that you can access a MongoDB database from DBeaver Community Edition using the
respective Devart ODBC driver. For the purposes of this guide, we'll use the Community
Edition of DBeaver to retrieve data from Dynamics 365 Business Central via the Open
Database Connectivity driver.
© 2025 Devart
Using in Third-Party Tools 75
5. Give a name to your data source and set up the connection parameters.
6. Click the Test Connection button to verify that you have properly configured the DSN.
When using ODBC driver for Dynamics 365 Business Central with DBeaver,
SQL_WVARCHAR data types may be displayed incorrectly in DBeaver. To prevent this, you
need to set the string data types to Ansi either in the Advanced Settings tab of the driver
configuration dialog or directly in the connection string (String Types=Ansi) — all string types
will be returned as SQL_CHAR, SQL_VARCHAR and SQL_LONGVARCHAR.
© 2025 Devart
76 ODBC Driver for Dynamics 365 Business Central
DBeaver.
1. In the Database menu, select New Database Connection.
© 2025 Devart
Using in Third-Party Tools 77
4. Click Test Connection. If everything goes well, you'll see the Success message.
© 2025 Devart
78 ODBC Driver for Dynamics 365 Business Central
If you want to write a custom SQL query that will include only the necessary columns from the
table, you can select New SQL Editor in the SQL Editor main menu. Create your query and
run it by clicking Execute SQL Statement to view the results in the same window.
© 2015-2025
Devart. All Rights Request Support ODBC Forum Provide Feedback
Reserved.
© 2025 Devart
Using in Third-Party Tools 79
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
)
Add an entry to the listener.ora file to start the gateway in response to connection requests.
The SID of the gateway (SID_NAME) must be the same in listener.ora and tnsnames.ora.
ORACLE_HOME is the Oracle home directory where the gateway resides. To apply the new
settings, stop and restart the Oracle Net Listener service.
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(SID_NAME=Dynamics 365 Business Central)
(ORACLE_HOME=D:\ORACLE_HOME)
(PROGRAM=dg4odbc)
)
)
© 2025 Devart
80 ODBC Driver for Dynamics 365 Business Central
listener.ora file.
See also
Configuring Oracle Database Gateway for ODBC
© 2015-2025
Devart. All Rights Request Support ODBC Forum Provide Feedback
Reserved.
Due to incompatibilities between DBxtra and Dynamics 365 Business Central, leaving the SQL
dialect property to its default might present various issues. To resolve compatibility issues,
set the property to MS Access 2000/XP/2003 or ANSI SQL/2003 for DBxtra version 11.0.1 or
© 2025 Devart
Using in Third-Party Tools 81
© 2015-2025
Devart. All Rights Request Support ODBC Forum Provide Feedback
Reserved.
© 2025 Devart
82 ODBC Driver for Dynamics 365 Business Central
through the standard ODBC interface. Microsoft Access is a dababase management system
that combines the relational database engine with a graphical user interface. Access can be
used as a substitution for spreadsheet applications like Excel to organize, store, and retrieve
large amounts of related data that can be difficult to manage in spreadsheets.
In Microsoft Access, you can connect to your Dynamics 365 Business Central data either by
importing it or creating a table that links to the data. Devart ODBC drivers support all modern
versions of Access. It is assumed that you have already installed and configured a DSN for
ODBC driver for Dynamics 365 Business Central. For the purpose of this article, we tested
an ODBC connection to Dynamics 365 Business Central through our ODBC drivers in
Microsoft Access 2003, Microsoft Access 2007, Microsoft Access 2010, Microsoft Access
2013, Microsoft Access 2016, Microsoft Access 2019. The following steps describe how to
use Microsoft Access 2019 to import or link to your data in Dynamics 365 Business Central.
6. Select the DSN that you have configured for Dynamics 365 Business Central and click OK.
7. In the Import Objects dialog box, select the tables that you want to import, and click OK.
8. If the database objects have been successfully imported, you should the see the
corresponding message in the dialog box. If you want to save the import steps to quickly
repeat the process without using the wizard at a later time, select the Save import steps
checkbox. Click Close.
9. The imported tables should appear in the Tables navigation pane on the left.
10.Double-click on the needed table to display its contents.
© 2025 Devart
Using in Third-Party Tools 83
4. In the Get External Data - ODBC Database dialog box, select Link to the data source
by creating a linked table.
5. In the Select Data Source dialog box, select the Machine Data Source tab.
6. Select the DSN that you have configured for Dynamics 365 Business Central and click OK.
7. In the Link Tables dialog box, select the table or tables that you want to link to, and click
OK.
8. The Select Unique Record Identifier dialog box will prompt you to choose a field or fields
that uniquely identify each record in the table. To avoid inconsistencies, it is recommended
to select the primary key in the Dynamics 365 Business Central table as the unique record
identifier. You are linking multiple tables, you will be prompted to select unique record
identifiers for each of the selected tables.
9. The linked tables should appear in the Tables navigation pane on the left.
10.Double-click on the needed table to display its contents.
© 2015-2025
Devart. All Rights Request Support ODBC Forum Provide Feedback
Reserved.
© 2025 Devart
84 ODBC Driver for Dynamics 365 Business Central
ODBC Driver, e.g. if you have installed a 64-bit ODBC Driver, you will need to use the 64-bit
version of Excel.
When working with Microsoft Excel, there are different ways of retrieving data from various
data sources using our ODBC drivers.
Connecting Excel to Dynamics 365 Business Central with Get & Transform (Power Query)
Connecting Excel to Dynamics 365 Business Central with Data Connection Wizard
(Legacy Wizard)
Connecting Excel to Dynamics 365 Business Central with the Query Wizard
© 2025 Devart
Using in Third-Party Tools 85
2. In the From ODBC dialog, choose your data source name (DSN). If you haven't configured
your ODBC driver yet, you can expand the Advanced Options dialog box and enter the
connection string for your data source (without credentials, which are defined in the
credentials dialog box in the next step). Additionally, you can enter an SQL statement that
will be executed right after establishing a connection to the data source. Click OK.
© 2025 Devart
86 ODBC Driver for Dynamics 365 Business Central
3. If you're using a database username or password, select Database and enter your
credentials in the dialox bog, then click Connect.
© 2025 Devart
Using in Third-Party Tools 87
If your database is not password-protected or you've already specified your credentials in the
ODBC data source settings, select Default or Custom and press Connect
4. In the window that appears, select the table you want to retrieve data from, and click Load.
The data from the table will be a displayed in an Excel spreadsheet where you can further
work with it.
© 2025 Devart
88 ODBC Driver for Dynamics 365 Business Central
2. In the opened dialog, select ODBC DSN and click Next to continue.
3. Now select a data source you want to connect to, and click Next.
4. To connect to the table containing the required data, select its name and click Next to enter
and save information about your new file or click Finish.
5. In the Import data dialog, you can select the way your data will be viewed in Excel and the
place where to put it in the worksheet, and click OK.
6. The required data is now displayed in the existing Excel worksheet.
© 2025 Devart
Using in Third-Party Tools 89
You can use this option to create a simple query for retrieving data from Dynamics 365
Business Central to Excel via ODBC driver.
1. Open Excel, in the main menu, click the Data tab.
2. Click the From Other Sources dropdown menu, and then click From Microsoft Query.
3. In the appeared dialog, you can choose the data source you want to connect to.
4. After a successful connection, you can select the data you want to be displayed in Excel
and click Next.
5. The next two steps allow filtering and sorting the data. Click Next to skip these procedures.
6. If you plan to further use the query, you can save it by clicking the Save button on the right.
7. Select Return Data To Microsoft Excel and click Finish.
8. In the Import data dialog, you can select the way your data will be viewed in Excel and the
place where to put it in the worksheet, and click OK.
9. The required data is successfully imported to Excel.
3. In the next dialog, choose the data source you want to connect to (e.g., using data source
name - Devart ODBC Dynamics 365 Business Central). Uncheck Use the Query Wizard
to Create/Edit Queries and click OK.
4. Now you can select the tables you want to add to your query. When you finish, just click
the Add button.
5. In the graphical editor, you can filter rows or columns of data, sort data, join multiple tables,
create a parameter query, etc.
You can use PowerPivot - an Excel add-in to perform data analysis and create complex data
models. To load the required data, do the following:
1. In Excel, click the PowerPivot tab, then click Manage to go to the PowerPivot window.
2. In the opened window, click From Other Sources.
3. When the Table Import Wizard opens, select Others (OLEDB/ODBC) and click Next.
4. In the Specify a Connection String window, click the Build button.
5. In the Data Link Properties dialog, specify the data source you want to connect (e.g.,
using data source name - Devart ODBC Dynamics 365 Business Central), and then click
Next.
6. Now you should choose how to import the data (either select a table from the list or write a
query to specify the data to be imported).
7. When the Import operation succeeded, click the Close button. The retrieved data is
inserted in the active worksheet.
© 2015-2025
Devart. All Rights Request Support ODBC Forum Provide Feedback
Reserved.
This guide describes how to connect to Dynamics 365 Business Central and retrieve data
importing them to Visual Studio with an ODBC driver. It is assumed that you have already
installed and configured a DSN for ODBC driver for Dynamics 365 Business Central.
1. Run Visual Studio Desktop and click Tool and select Connect to Database.
2. In the Add connection dialog box, select the Microsoft ODBC Data Source as a data
source.
© 2025 Devart
Using in Third-Party Tools 91
3. In the Data source specification point expand the Data Source Name (DSN) drop-down
list and select the previously configured DSN for Dynamics 365 Business Central.
Alternatively, you can connect to the database by entering the DSN in a Use connection
string field. To check whether your connection is successful, click Test connection.
Click OK.
4. If your data source is password-protected, Visual Studio will prompt you for user
credentials. Type your Username and Password in the respective fields and click OK.
5. In the Server Explorer you can see the database structure. Choose Tables, right-click the
table you want to view the data of and select Retrieve Data. You can also preview the
contents of the database objects by clicking on them.
© 2015-2025
Devart. All Rights Request Support ODBC Forum Provide Feedback
Reserved.
This section describes how to establish and troubleshoot a connection to Dynamics 365
Business Central from SQL Server Management Studio using ODBC Driver for Dynamics
365 Business Central.
Creating a Linked Server
Troubleshooting in SSMS
© 2015-2025
Devart. All Rights Request Support ODBC Forum Provide Feedback
Reserved.
4.7.1 Creating a Linked Server
Requirements
In order to avoid incorrect integration with MS SSMS, the working environment must meet the
following conditions:
The data source must be a configured system DSN. Refer to the Driver Configuration
article to learn how to configure a System DSN
The driver, studio, and SQL Server must be of the same bitness. For example, if you are
© 2025 Devart
92 ODBC Driver for Dynamics 365 Business Central
using 64-bit SQL Server Management Studio on 64-bit Windows platform, then configure
the 64-bit version of the driver using ODBC Administrator launched from %windir%
\system32\odbcad32.exe. Otherwise, configure the driver using the 32-bit version of ODBC
Administrator - launch it from %windir%\SysWOW64\odbcad32.exe.
ODBC Driver for Dynamics 365 Business Central and SQL Server must be installed on the
same computer.
Below are major advantages of using SQL Server Linked Servers to connect to Dynamics
365 Business Central:
1. The ability to connect other database instances on the same or remote server.
2. The ability to run distributed queries on heterogeneous data sources across the
organization.
3. The ability to work with diverse data sources in the same way.
© 2025 Devart
Using in Third-Party Tools 93
Choose Microsoft OLE DB Provider for ODBC Drivers in the Provider drop-down
list.
In the Data source field, enter the name of your DSN, e.g. Devart ODBC Driver for
Dynamics 365 Business Central . Alternatively, you can input the ODBC Driver
connection string in the Provider field.
The linked server will appear under the Linked Servers in the Object Explorer Pane. You can
now issue distributed queries and access Dynamics 365 Business Central databases
through SQL Server.
© 2025 Devart
94 ODBC Driver for Dynamics 365 Business Central
In the appeared Provider Options window, enable the Allow inprocess checkbox:
© 2025 Devart
Using in Third-Party Tools 95
Now you need to input the Linked Server name, e.g. DYNAMICSBC. In the Product Name and
Data Source fields you need to indicate the System DSN that you've previously created -
more info on System DSN setup can be found here.
The Dynamics 365 Business Central tables are already available to be fetched. To query the
linked server, click New Query in the toolbar:
© 2025 Devart
96 ODBC Driver for Dynamics 365 Business Central
Enter your SQL query in the editor window and click Execute to run the query:
As a result, you can see the contents of the selected table retrieved directly from the
Dynamics 365 Business Central account you are connected to.
© 2025 Devart
Using in Third-Party Tools 97
See also
Troubleshooting SSMS
© 2015-2025
Devart. All Rights Request Support ODBC Forum Provide Feedback
Reserved.
4.7.2 Troubleshooting in SSMS
When creating a linked server in SSMS, most errors happen due to security issues with
DCOM class MSDAINITIALIZE. We need to alter the DCOM Class MSDAINITIALIZE security
settings to make it work.
© 2025 Devart
98 ODBC Driver for Dynamics 365 Business Central
4. Go to the Security Tab, Choose ‘Customize’ and click on the ‘Edit’ Button:
© 2025 Devart
Using in Third-Party Tools 99
5. Add the Domain User who is accessing the linked server and ‘Allow’ all the permissions
available (Local Launch, Remote Launch, Local Activation, Remote Activation). If you are
connecting to SQL server using SQL account, you need to provide this permission to the
account under which the SQL service is running.
6. Do this for all the 3 sections in the above screenshot.
© 2025 Devart
100 ODBC Driver for Dynamics 365 Business Central
© 2025 Devart
Using in Third-Party Tools 101
See also
Error message when you try to create an instance of an OLE DB provider in SQL Server:
"Cannot create an instance of OLE DB provider"
© 2015-2025
Devart. All Rights Request Support ODBC Forum Provide Feedback
Reserved.
© 2025 Devart
102 ODBC Driver for Dynamics 365 Business Central
To connect to an ODBC data source from OpenOffice or LibreOffice using our driver for
Dynamics 365 Business Central, perform the steps below:
1. Start OpenOffice or LibreOffice, click Database to open the Database Wizard.
Alternatively, you can launch the Database Wizard from OpenOffice or LibreOffice Calc,
Writer or any other tool by choosing File > New > Database.
© 2025 Devart
Using in Third-Party Tools 103
2. In the Database Wizard dialog box, click Connect to an existing database, select
ODBC from the drop-down list, and click Next.
© 2025 Devart
104 ODBC Driver for Dynamics 365 Business Central
3. Specify the name of the data source you want to connect to. You can either type the name
of your data source into the field, e.g. ODBC Driver for Dynamics 365 Business Central,
or you can click Browse, double-click the data source you need, and then click Next.
© 2025 Devart
Using in Third-Party Tools 105
4. If your database requires a user name, type it into the User name field. If you are
connecting to a password protected database, check the Password required field.
Alternatively, you can specify these parameters in the data source settings of your ODBC
© 2025 Devart
106 ODBC Driver for Dynamics 365 Business Central
Driver for Dynamics 365 Business Central and leave these fields empty in Database
Wizard.
To test the connection to your data source, click Test Connection, input your credentials
and click OK.
© 2025 Devart
Using in Third-Party Tools 107
If you have entered valid credentials, you will see a success message. Click Next to proceed
to the final step.
5. You can keep the default selection in this dialog box and click Finish.
© 2025 Devart
108 ODBC Driver for Dynamics 365 Business Central
You will be prompted to give a name to your new database and select the directory where you
want to store it.
© 2025 Devart
Using in Third-Party Tools 109
6. When the database opens, you will see the list of tables from your data source diplayed in
OpenOffice or LibreOffice Base workspace. To view the data from a specific table, double-
click the table name.
© 2025 Devart
110 ODBC Driver for Dynamics 365 Business Central
7. To create an SQL query, click Queries in the Database pane, then click Create Query in
SQL View…
© 2025 Devart
Using in Third-Party Tools 111
Enter your query in the query text box and click Run Query (F5). The date will be fetched
from the database and displayed in Open Office or LibreOffice, respectively.
© 2015-2025
Devart. All Rights Request Support ODBC Forum Provide Feedback
Reserved.
© 2025 Devart
112 ODBC Driver for Dynamics 365 Business Central
PHP-based projects usually require a data storage, whether a traditional database or a cloud-
based database. You can establish a connection to them using ODBC interface. With our
ODBC drivers, you can access various data sources and retrieve tables and fields from a
database.
Below is a sample PHP script for accessing Dynamics 365 Business Central via ODBC. The
script connects to Dynamics 365 Business Central database and fetches all records from a
table:
The odbc_connect() function is used to connect to an ODBC data source. Note that the
function takes three mandatory parameters: the data source name, username and password.
If your database is not password-protected or doesn't require a username, leave these
parameters empty. In the following example, a connection is established using the
odbc_connect() function in PHP.
<?php
$user = "myusername";
$password = "mypassword";
$ODBCConnection = odbc_connect("DRIVER={Devart ODBC Driver for Dynamics
Step 2: Execute an SQL statement
The odbc_fetch_row() function is used to return records from the result set. While
odbc_fetch_row() returns rows, the odbc_result_set() function prints a set of result in HTML
© 2025 Devart
Using in Third-Party Tools 113
table. After all rows from the result set have been printed, the odbc_close() function closes
the connection.
This tutorial explores how to connect to Dynamics 365 Business Central and import data into
Power BI Desktop using an ODBC driver. It is assumed that you have already installed and
configured a DSN for ODBC driver for Dynamics 365 Business Central.
1. Run Power BI Desktop and click Get Data.
2. Select the Other category in the Get Data dialog box, then select ODBC. Click Connect
to confirm the choice.
3. In the From ODBC dialog box, expand the Data Source Name (DSN) drop-down list and
select the previously configured DSN for Dynamics 365 Business Central
4. If you would like to enter a SQL statement to narrow down the returned results, click the
Advanced options arrow, which expands the dialog box, and type or paste your SQL
statement.
5. Click OK. If your data source is password-protected, Power BI will prompt you for user
credentials. Type your Username and Password in the respective fields and click.
6. Now you should see the data structures in your data source. You can preview the contents
© 2025 Devart
114 ODBC Driver for Dynamics 365 Business Central
© 2015-2025
Devart. All Rights Request Support ODBC Forum Provide Feedback
Reserved.
If you don't have Python installed on your machine, go to the Python official website, download
the appropriate installer and run it. You will also need to install the pyodbc module — the
easiest way to do that is by using the pip install pyodbc command in the Python interactive
mode. Next, you need to download the ODBC Driver for Dynamics 365 Business Central. To
use the ODBC driver as a translation layer between the application and the database, you
need to configure it by following the installation instructions.
Step 1: Connect
import pyodbc
cnxn = pyodbc.connect('DRIVER={Devart ODBC Driver for Dynamics 365 Business
© 2025 Devart
Using in Third-Party Tools 115
Here's a simple example of how to execute an insert statement to test the connection to the
database. The script inserts a new record to the EMP table.
cursor = cnxn.cursor()
cursor.execute("INSERT INTO EMP (EMPNO, ENAME, JOB, MGR) VALUES (535, 'Scott
Step 3: Execute query
The cursor.execute() function retrieves rows from the select query on a dataset. The
cursor.fetchone() function iterates over the result set returned by cursor.execute() while the
print() function prints out all records from the table to the console.
cursor = cnxn.cursor()
cursor.execute("SELECT * FROM EMP")
row = cursor.fetchone()
while row:
print (row)
row = cursor.fetchone()
cursor.close()
cnxn.close()
© 2015-2025
Devart. All Rights Request Support ODBC Forum Provide Feedback
Reserved.
QlikView supports the ODBC connectivity interface for communication with external data
sources. An ODBC data source must be configured for the database you want to access.
You can create an ODBC connection using a DSN during the ODBC driver installation or
© 2025 Devart
116 ODBC Driver for Dynamics 365 Business Central
later.
To connect to an ODBC data source from QlikView using our driver for Dynamics 365
Business Central, perform the steps below:
1. Open the QlikView client application and click File > New. Close the Getting Started
wizard and open File > Edit Script (CTRL+E).
2. In the Data tab, choose ODBC from the Database drop-down and click Connect. Select
the Data Source you created earlier, type in the User ID and Password if your database is
password-protected. You can test the connection by choosing Test Connection. The
Connection Test succeeded message should appear. Click OK to connect to your data
source.
© 2025 Devart
Using in Third-Party Tools 117
3. To retrieve the data from your data source, you can enter an SQL query and press F5. You
will be suggested to choose fields to be displayed.
© 2025 Devart
118 ODBC Driver for Dynamics 365 Business Central
4. Alternatively, you can click Select, and QlikView will show you the database structure
window where you can compose a SELECT statement for the data to be fetched. You can
choose a different database from the database drop-down list. Select the necessary tables
and fields. You can retrieve date from multiple tables and fields by selecting them and
© 2025 Devart
Using in Third-Party Tools 119
clicking Add. When you are ready with your SELECT statement, click OK. You will get
back to the main script editor with your SQL statement. Press F5 to execute the script and
select the fields to be displayed in QlikView.
5. Once the data has been fetched, you can choose a table layout to present the data in a
table. Choose Layout > New Sheet Object > Table Box. Select the fields to be added to
the tablebox and click OK.
© 2025 Devart
120 ODBC Driver for Dynamics 365 Business Central
© 2015-2025
Devart. All Rights Request Support ODBC Forum Provide Feedback
Reserved.
SQL Server Integration Services (SSIS) is a component of SQL Server that is designed to
perform various data migration tasks. When using Devart ODBC Driver for Dynamics 365
Business Central as a translation layer between the data source and SSIS, the driver and
© 2025 Devart
Using in Third-Party Tools 121
Note that when you extract data from an ODBC data source using the SQLExecDirect function,
an issue may occur: SSIS expects the ODBC 2.x behavior, while the ODBC driver continues
to fetch data from a data source via ODBC version 3.x. To prevent any issues when using
SQLExecDirect, you should force the ODBC 2.x behavior in the DSN settings: open the
Advanced Settings tab and select Ver 2.x from the ODBC Behavior dropdown.
© 2015-2025
Devart. All Rights Request Support ODBC Forum Provide Feedback
Reserved.
© 2025 Devart
122 ODBC Driver for Dynamics 365 Business Central
This article explains to establish and ODBC connection to Dynamics 365 Business Central
from Tableau Desktop. Tableau is a data visualization tool that allows you to pull in raw data,
perform analysis on it, and create meaningful reports to get actionable insights. With Tableau
Desktop and our suite of ODBC drivers, you can connect to various relational and non-
relational databases, both cloud and on-premise.
1. Run Tableau Desktop.
2. On the start page, select More... in the Connect pane.
3. Choose Other Databases (ODBC).
4. Expand the DSN drop-down list and select the DSN that you have created and configured
for Dynamics 365 Business Central. Alternatively, if you have not created a DSN, you can
choose the Driver option and select Devart ODBC Driver for Dynamics 365 Business
Central from the drop-down.
5. Click Connect.
6. After a successful connection, click Sign in.
7. Select the needed database and schema in Dynamics 365 Business Central.
8. You should see the list of all tables you have access to in the connected data source.
9. Drag-and-drop the table name to the area where it says Drag tables here to retrieve the
data, or click New Custom SQL to write a query that will select only specific data from the
table.
10.Hit Update Now to retrieve and display the data.
© 2015-2025
Devart. All Rights Request Support ODBC Forum Provide Feedback
Reserved.
© 2025 Devart