skip to main content
Using the ODBC Client : Specifying ODBC Connection Attributes : WorkArounds2
 

WorkArounds2

Attribute

WorkArounds2 (WA2)

Description

Turns on workarounds that allow you to take full advantage of the ODBC driver with ODBC applications requiring nonstandard or extended behavior.
IMPORTANT: 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.
If set to 2, the driver ignores the ColumnSize/DecimalDigits specified by the application and uses the database defaults instead. Some applications incorrectly specify ColumnSize/DecimalDigits when binding timestamp parameters.
If set to 4, Microsoft Access uses the most recent native type mapping, as returned by SQLGetTypeInfo, for a specific SQL type. This option reverses the order in which types are returned, so that Microsoft Access will use the most appropriate native type. This option is recommended if you are using Microsoft Access against an Oracle8.x data store.
If set to 32, Microsoft Access requires that the characters "DSN=" are returned by SQLDriverConnect in the connection string output parameter.
If set to 128, SQLGetInfo(SQL_ACTIVE_STATEMENTS) returns 0 to avoid the overhead of extra connections that some applications open if SQLGetInfo(SQL_ACTIVE_STATEMENTS) does not return 0.
If set to 256, this workaround for MSDASQL causes the driver to return Buffer Size for Long Data on calls to SQLGetData with a buffer size of 0 on columns whose SQL type is SQL_LONGVARCHAR or SQL_LONGVARBINARY. Applications should always set this workaround when using MSDASQL and retrieving long data.
If set to 1024, this workaround for ADO causes the driver to return "N" for a SQLGetInfo call. ADO incorrectly interprets the SQLGetInfo(SQL_MULT_RESULT_SETS) to mean that the last result set returned from a stored procedure is the output parameters for the stored procedure.
If set to 2048, the driver accepts the 2.x SQL types incorrectly generated by the ODBC cursor library as valid. ODBC 3.x applications that use the ODBC cursor library receive errors on bindings for SQL_DATE, SQL_TIME, and SQL_TIMESTAMP columns. The cursor library incorrectly rebinds these columns with the ODBC 2.x type defines.
If set to 4096, the ODBC driver internally adjusts the length of empty strings when the ODBC Driver Manager incorrectly translates lengths of empty strings when a Unicode-enabled application uses a non-Unicode driver. Use this workaround only if your application is Unicode enabled.
If set to 8192, Microsoft Access 2000 does not pass the error -7748 on null termination. When Microsoft Access 2000 calls SQLStatisticsW and SQLGetData for column number 10, it only asks for the data as a two-byte SQL_C_WCHAR, which is insufficient buffer to store the UCS2 character and the null terminator. Thus, the driver returns a warning, "01004 Data truncated", and returns a null character to Microsoft Access.
If set to 16384, base optimization is disabled if an application calls Prepare/Execute. Prepare/Execute with the same SQL base prepares the statement, and does not treat it as a Prepare/Execute/Execute.