# Troubleshoot the Connector

This section describes how to troubleshoot common problems that might occur when you set up the ODBC Connector.

Use 64-bit ODBC Drivers

You must use a 64-bit ODBC driver. On Windows, define your Data Source Name (DSN) in the 64-bit ODBC Data Source Administration utility.

The number of connections is exceeded when using sub tables

The ODBC Connector opens a new connection to retrieve data from each sub-table that you specify in the connector’s configuration file. However, some ODBC implementations limit the number of connections. If this occurs, you can set the configuration parameter `UseSingleConnectionForSubtables` to `true`. This ensures that the connector uses only one connection for retrieving data from sub-tables.

Data is not returned as expected

If the connector does not return the data you expect, use a SQL tool or interface to run the query that you entered in the connector’s configuration file. Check that the data returned matches what you want to retrieve. The connector cannot retrieve XML data types, but you can modify your SELECT statement to convert these data types into strings.

The connector does not populate a document field with the data from a content field

This is expected behavior. The information in the content field (specified by the `ContentField` parameter) is used to populate the document content. If your content field contains a file path and you want to write the path to a document field, you can modify your SQL query to return the column under another name. For example:

    SELECT myfield, myfield AS "anotherfield" FROM tablename...

Then, in your template file, specify the alternate name:

    #DREFIELD MyFieldName="<!--anotherfield-->"

Retrieve BLOB values from an IBM DB2 database ("unsupported column data type" error)

The connector might fail to retrieve BLOB data from an IBM DB2 database, and write the following message to the synchronize log:

    Unsupported column data type

This is due to the data types returned by the IBM DB2 ODBC driver. To resolve this issue, set `LongDataCompat=1` in the DB2 ODBC driver configuration file `db2cli.ini`. This changes the types that are returned. For more information about this parameter, refer to the IBM DB2 documentation.

Conversion failed when converting from a character string to uniqueidentifier (SQL Server)

SQL Server has a `uniqueidentifier` column type. When the ODBC Connector retrieves data from the database, these values are automatically converted into strings. This is suitable for indexing the data into IDOL. However, you might want to use the value of a `uniqueidentifier` column when sending a query to a sub-table. For example:

`SQL=SELECT id, something_else FROM table WHERE id = '@id'`

In this case, you might see the error Conversion failed when converting from a character string to uniqueidentifier. This is because the query is executed server-side and the data types no longer match. The value sent by the connector, replacing the `@id` placeholder, is a string and not a `uniqueidentifier`. You can modify your query so that SQL Server converts a `uniqueidentifer` type into a string. For example:

`SQL=SELECT id, something_else FROM table WHERE CONVERT(nvarchar(50), id) = '@id'`

The server then attempts to compare two strings and the query is successful.

Known issue with Microsoft SQL Server ODBC Driver and OpenSSL on Linux

Some versions of the Microsoft ODBC driver for SQL Server load OpenSSL dynamically (using the latest version installed on the system). With some versions of the driver, if the versions of OpenSSL used by the application and driver are different, the application (the connector) can terminate unexpectedly on startup. The workaround is to update the system version of OpenSSL to match what the connector uses. In some Linux distributions this might involve building OpenSSL from source. For more information, see the Microsoft ODBC driver documentation. For information about the version of OpenSSL used in IDOL components, refer to the IDOL Open Source and Third-Party Components documentation.

_FT_HTML5_bannerTitle.htm