Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
Versions of the unixODBC release prior to version 2.2.13 have incorrectly implemented some aspects of the 64-bit ODBC specification as defined by Microsoft. These differences will cause problems when using the unixODBC driver manager with the SQL Anywhere 64-bit ODBC driver.
To avoid these problems, you should be aware of the differences. One of them is the definition of SQLLEN and SQLULEN. These are 64-bit types in the Microsoft 64-bit ODBC specification, and are expected to be 64-bit quantities by the SQL Anywhere 64-bit ODBC driver. Some implementations of unixODBC define these two types as 32-bit quantities and this will result in problems when interfacing to the SQL Anywhere 64-bit ODBC driver.
There are three things that you must do to avoid problems on 64-bit platforms.
Instead of including the unixODBC headers like sql.h and sqlext.h, you should include the SQL Anywhere ODBC header file unixodbc.h. This will guarantee that you have the correct definitions for SQLLEN and SQLULEN. The header files in unixODBC 2.2.13, when it is released, will correct this problem.
You must ensure that you have used the correct types for all parameters. Use of the correct header file and the strong type checking of your C/C++ compiler should help in this area. You must also ensure that you have used the correct types for all variables that are set by the SQL Anywhere driver indirectly through pointers. See 64-bit ODBC considerations.
You must not use versions of the unixODBC driver manager prior to release 2.2.13. Instead, you can link directly to the SQL Anywhere ODBC driver. For example, ensure that the libodbc shared object is linked to the SQL Anywhere driver.
libodbc.so.1 -> libdbodbc11_r.so.1
Alternatively, you can use the SQL Anywhere driver manager on platforms where it is available. See Using the SQL Anywhere ODBC driver manager on Unix.
For more information, see Linking ODBC applications on Unix.
|Discuss this page in DocCommentXchange.
Send feedback about this page using email.
|Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1|