ODBC
Version 22.0.8486
Version 22.0.8486
ODBC
This page outlines the steps to use the ODBC Driver for CData Connect.
Prerequisites
Before you can configure and use ODBC with CData Connect, you must first connect a data source to your CData Connect account. See Data Model for more information.
Installing the Driver
Follow these steps to download and install the driver:
-
Open the Clients page of CData Connect.
-
In the Dev Tools section, locate ODBC and click Download.
-
Download and run the setup file for your operating system.
-
After installation, follow the steps for your platform below.
Creating a DSN
The following guides show how to use the standard tools to configure data source names (DSN). You will need to configure the DSN to use the driver.
Windows
Follow these steps to edit the DSN configuration using the Microsoft ODBC Data Source Administrator:
-
Open the Start menu and enter ODBC Data Sources in the Search box.
-
Choose the version of the ODBC Administrator that corresponds to your application (32-bit or 64-bit).
-
Click the System DSN tab.
-
Select Connect Sys and click Configure.
-
Enter the following information:
-
AuthScheme—select Basic.
-
URL—enter
[baseurl]/rest.rsc/
, substituting the base URL of your CData Connect server for[baseurl]
. For example, localhost:8080 or myConnectInstance.cdata.com. -
User—enter your CData Connect username as defined on the Users page.
-
Password—enter the Authtoken for the user.
-
-
In the Misc section, enter the connection name of the data source you want to access in the Default Catalog field (e.g., Salesforce1).
-
Click Test Connection. If the connection fails, check that you entered the login credentials correctly and try again.
-
Click OK in the DSN Configuration window, then OK in the ODBC Data Source Administrator window.
Note: For .NET Framework 4.0, the driver distributes Microsoft Visual C++ 2017 Redistributable. For .NET Framework 3.5, the driver distributes Microsoft Visual C++ 2008 Redistributable.
macOS
Note: The ODBC Driver for CData Connect requires macOS Sierra (10.12) or above.
On macOS, the ODBC Driver for CData Connect is pre-configured for use with the iODBC driver manager. You can find the latest version of iODBC on the iODBC site.
Follow these steps to configure the driver:
-
Install iODBC and the ODBC Driver for the CData Connect.
-
Launch the iODBC Data Source Administrator.
-
Under most circumstances, the driver should automatically appear in the System DSN tab of the iODBC Data Source Administrator. If it does, continue to Logging In.
-
If the driver does not appear automatically, follow the steps under Manually Adding the Driver.
-
Logging In
Follow the steps below to connect the driver to your CData Connect account:
-
In the iODBC Data Source Administrator, click on the driver entry on the User DSN or System DSN tab to select it.
-
Enter the following information:
-
AuthScheme—select Basic.
-
URL—enter
[baseurl]/rest.rsc/
, substituting the base URL of your CData Connect server for[baseurl]
. For example, localhost:8080 or myConnectInstance.cdata.com. -
User—enter your CData Connect username as defined on the Users page.
-
Password—enter the Authtoken for the user.
-
-
Click OK to close the iODBC Data Source Administrator.
You can now use the configured connection in any tools or applications that support ODBC connectivity.
Manually Adding the Driver
If the ODBC Driver for CData Connect does not automatically appear in the iODBC Data Source Administrator, first check if you have existing ODBC configuration files called odbc.ini
and odbcinst.ini
.
-
User DSN files appear in
/Users/[myuser]/Library/ODBC/
. -
System DSN files appear in
/Library/ODBC/
.
Files Do Not Exist
If the files do not already exist in either of the directories above, follow these steps:
-
Navigate to the driver install directory. By default, this is
/Applications/CData ODBC Driver for CData Connect/
. -
Open the
etc
folder and copy theodbc.ini
andodbcinst.ini
files. - Copy the files to either the User DSN or System DSN directory.
- The User DSN directory is
/Users/[myuser]/Library/ODBC/
. If you choose this option, you can only access your connection for the user you install it for. - The System DSN directory is
/Library/ODBC/
. If you choose this option, you can access the connection for all users, but copying the files may prompt you for elevated permissions.
- The User DSN directory is
-
Quit and re-launch the iODBC Data Source Administrator.
- Follow the steps for Logging in to complete setup.
Files Already Exist
If you already have ODBC configuration files in one of the directories above, follow these steps:
-
Navigate to the driver install directory. By default, this is
/Applications/CData ODBC Driver for CData Connect/
. -
Open the
etc
folder and then open theodbc.ini
file. Copy the contents to your clipboard. -
Open the existing
odbc.ini
file in the DSN directory.-
If it is in the User DSN directory (
/Users/[myuser]/Library/ODBC/
), you can open the file directly through Finder. -
If it is in the System DSN directory (
/Library/ODBC/
), you will need to open the file with elevated permissions. Open a Terminal window and entersudo nano /Library/ODBC/odbc.ini
, providing your password when prompted.
-
-
Paste the contents of the
odbc.ini
file from the Driver installation directory into the bottom of the existingodbc.ini
file in the DSN directory. -
Save your changes. If you are in a terminal window, use the key combination Control ^+O.
-
Repeat steps 2 through 5 above for the
odbcinst.ini
file. -
Quit and re-launch the iODBC Data Source Administrator.
-
Follow the steps for Logging in to complete setup.
Linux
Click here for documentation on configuring a DSN on Linux.
More Information
To learn more information about using the ODBC Driver for CData Connect, click here.