[unixODBC-support] problem with SQL connect on Solaris with MySQL

Andy Howell AndyHowell at raitechnology.com
Mon May 30 18:24:35 BST 2005

Eric Sharkey wrote:
> Driver manager tracing is enabled in odbcinst.ini, not odbc.ini.
> Just add:
> [ODBC]
> Trace           = Yes
> If you add that to odbc.ini instead of odbcinst.ini, it will be ignored.

Found the problem. In my code I had:

SQLSetConnectAttr( sqlDbConnHdl, SQL_LOGIN_TIMEOUT,
	(SQLPOINTER *)5, 0);

For some reason this does not work on solaris. When I commented out that
line, it worked fine. I tried increasing the timeout to 30 seconds, but
that didn't make any difference. In the log file, I could see that the
value was being set. Its still a mystery to me why this causes a problem
on solaris, but not linux. Maybe a problem with the MySQL driver?

I used http://www.unixodbc.org/doc/ProgrammerManual/Tutorial/conne.html
as the basis for my code.



More information about the unixODBC-support mailing list