Feedback
 
Did this article resolve your question/issue?

   

Your feedback is appreciated.

Please tell us how we can make this article more useful. Please provide us a way to contact you, should we need clarification on the feedback provided or if you need further assistance.

Characters Remaining: 1025

 


Article

Finding and setting WorkArounds and WorkArounds2 Connect for ODBC connection options

Information

 
Article Number000004300
EnvironmentProduct: Connect/Connect64 for ODBC driver
Version: All supported versions
OS: All supported platforms
Database: All supported databases
Application: All ODBC applications
Question/Problem Description
DataDirect has included non-standard options for the drivers that enable you to take full advantage of packaged ODBC-enabled applications requiring non-standard or extended behavior.
Where to find and set these connection options?

How to register additional strings for file DSN for ODBC?
How to register additional strings for system DSN for ODBC?
How to register additional strings for user DSN for ODBC?
How to modify the DSN settings in the registry?
Where to modify the DSN settings in the registry?
Steps to Reproduce
Clarifying Information
Error Message
Defect/Enhancement Number
Cause
Resolution

The WorkArounds and WorkArounds2 options are documented in the Connect/Connect64 for ODBC Reference Guide.
In earlier versions, WorkArounds and WorkArounds2 were documented in the ODBCREADME.txt file.

The options are specific to each release.
Note that each of these options has potential side effects related to its use.
An option should only be used to address the specific problem for which it was designed.

To set these options on your datasource:


Add the WorkArounds or WorkArounds2 options to the ODBC data source Extended Options field.  If adding multiple options, separate them by a semicolon.

If the driver does not have an Extended Options field, add the WorkArounds or WorkArounds2 options to the registry.

  • Launch regedit and open the data source section you want to modify

For 32-bit system ODBC data sources on 32-bit Windows; for 64-bit system ODBC data sources on 64-bit Windows:

HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\datasource

For 32-bit system ODBC data sources on 64-bit Windows:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBC.INI\datasource

For 32-bit/64-bit user ODBC data sources on 32-bit/64-bit Windows

HKEY_CURRENT_USER\SOFTWARE\ODBC\ODBC.INI\datasource

  • Add the string value pair WorkArounds (or WorkArounds2) with a value of n where the value n is the cumulative value of all options added together.

    e.g., WorkArounds 540016640 is a combination of WorkArounds 536870912 + WorkArounds = 2097152 + WorkArounds = 1048576.

where:

WorkArounds=536870912. This option allows for re-binding parameters after calling SQLExecute for prepared statements.

WorkArounds=2097152. Some applications incorrectly specify a precision of -1 for character types. This option overrides the specified
precision and sets the precision to 2000.

WorkArounds=1048576. Some applications incorrectly specify a precision of 0 for character types when the value will be SQL_NULL_DATA. This
option overrides the specified precision and sets the precision to 256.

NOTE: when using the Shadow 7 ODBC driver: add WA / WA2 instead of WorkArounds / WorkArounds2 !

  • When using a File data source, edit the file and add the option as follows:

    e.g. WorkArounds=540016640

When using a connection string, you can add these options to your connectionstring:

Driver=....;WorkArounds=540016640;WorkArounds2=1

When running on UNIX / Linux, edit the file to which your ODBCINI environment variable is pointing to (odbc.ini). To the ODBC data source section, add each option on a separate line.

[datasourcename]
Driver=...
...
WorkArounds=540016640
WorkArounds2=1

Workaround
Notes
References to other documentation:
Attachment 
Last Modified Date4/27/2018 11:30 PM