ODBC: Difference between revisions

From Elvanör's Technical Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
This article lists problems or things to remember when developing with ODBC for Naiade.
This article lists problems or things to remember when developing with ODBC for Naiade.
== MySQL ODBC driver ==
As of February 22, 2007, there is '''no''' stable version of an 64-bit ODBC driver for MySQL. The 3.51.12 MyODBC driver is '''completely unusable''' under Linux 64. As a result, since my primary development environment is now on Linux 64, I have to wait until a stable version of this driver is released, probably in a few monthes.


== unixODBC ==
== unixODBC ==


* Apparently, '''SQLBindCol''' does NOT accept a NULL pointer argument as its last argument (SQLLEN * StrLen_or_Ind). This leads to a segmentation fault and a crash when calling '''SQLFetch''' later. This does not seem conform to [http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odbcodbc_api_reference.asp Microsoft specifications], since providing a NULL pointer is legal. Under Windows, this behavior does not happen.
* Apparently, '''SQLBindCol''' does NOT accept a NULL pointer argument as its last argument (SQLLEN * StrLen_or_Ind). This leads to a segmentation fault and a crash when calling '''SQLFetch''' later. This does not seem conform to [http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odbcodbc_api_reference.asp Microsoft specifications], since providing a NULL pointer is legal. Under Windows, this behavior does not happen. ''Update:'' this is false, unixODBC is not the culprit, in fact it is due to the MySQL driver, absolutely unstable currently.


* A good documentation for unixODBC is [http://www.easysoft.com/developer/interfaces/odbc/linux.html available here.]
* A good documentation for unixODBC is [http://www.easysoft.com/developer/interfaces/odbc/linux.html available here.]
Line 10: Line 14:


* If installed using Portage, the configuration file is at /etc/iodbc/odbc.ini, NOT /etc/odbc.ini as said in the official documentation!
* If installed using Portage, the configuration file is at /etc/iodbc/odbc.ini, NOT /etc/odbc.ini as said in the official documentation!
* iODBC documentation is simply non-existant. So I don't plan to support iODBC for Naiade right now; the goal is to get it working with unixODBC first.

Latest revision as of 10:45, 22 February 2007

This article lists problems or things to remember when developing with ODBC for Naiade.

MySQL ODBC driver

As of February 22, 2007, there is no stable version of an 64-bit ODBC driver for MySQL. The 3.51.12 MyODBC driver is completely unusable under Linux 64. As a result, since my primary development environment is now on Linux 64, I have to wait until a stable version of this driver is released, probably in a few monthes.

unixODBC

  • Apparently, SQLBindCol does NOT accept a NULL pointer argument as its last argument (SQLLEN * StrLen_or_Ind). This leads to a segmentation fault and a crash when calling SQLFetch later. This does not seem conform to Microsoft specifications, since providing a NULL pointer is legal. Under Windows, this behavior does not happen. Update: this is false, unixODBC is not the culprit, in fact it is due to the MySQL driver, absolutely unstable currently.

iODBC

  • If installed using Portage, the configuration file is at /etc/iodbc/odbc.ini, NOT /etc/odbc.ini as said in the official documentation!
  • iODBC documentation is simply non-existant. So I don't plan to support iODBC for Naiade right now; the goal is to get it working with unixODBC first.