From: Tim H. <tim...@op...> - 2007-02-21 15:43:51
|
Stéphane Graziani wrote: > Using iODBC (3.52.5) on linux through otl4.h, I had a segmentation fault when calling SQLSetConnectAttr, because of the following code, line 1756 of odbc3.c in function SQLSetConnectAttr_Internal : > SQLUINTEGER dodbc_ver = ((ENV_t *) con->henv)->dodbc_ver; > > But in my case, con->henv is NULL. So I replaced this code by the following: > > SQLUINTEGER dodbc_ver = odbc_ver; > if (con->henv != NULL) { > dodbc_ver = ((ENV_t *) con->henv)->dodbc_ver; > } > > And now, everything works fine. > > Could-you please integrate this patch into the next release of iodbc? Hi, I've spoken with the iODBC Maintainer and we agree this is a useful patch for when an application calls SQLSetConnectAttr() before connecting; it will be included in the next release. Thanks for bringing it to our attention! Regards, ~Tim -- Tim Haynes OpenLink Software <http://www.openlinksw.com/> |