Easysoft
ODBC Drivers for Oracle, SQL Server, Firebird, ISAM, InterBase, Sybase, MS Access & more.

Easysoft ODBC-ODBC Bridge

Why do I get "SQLSetConnectOption err=-2" errors in my Perl scripts

Article : 00664
Last Reviewed : 19th July 2005
Revision : 1

When running a Perl script using DBD::ODBC linked with the unixODBC driver manager you see something similar to this:

DBI->connect(test) failed: (Unable to fetch information about the error)
(DBD: dbd_db_login/SQLSetConnectOption err=-2) at perl_e1.pl line 9

We believe this is caused by the combination of lazy linking and RTLD_GROUP.

Easysoft build unixODBC with the following configure options:

./configure --prefix=/usr/local/easysoft/unixODBC
--sysconfdir=/etc
--enable-threads=no (or yes when building a thread-safe version)
--enable-iconv=no
--enable-drivers=no
--enable-gui=yes (or no if you don't have X and QT)

--enable-rtldgroup=yes needs to be added to unixODBC 2.2.6, 2.2.7, 2.2.8 when unixODBC is dlopened by an application.

We also use --enable-readline=no on some platforms because our base build boxes are older and many newer machines don't have the older libreadline.

Applies To

Knowledge Base Feedback

* Did this content help you?
Yes
No
Maybe
 
* Please select one option based on your first choice:
I'm very satisfied
I think it will help, but I haven't tried it yet
It is helpful, but I need more information
It is helpful, but hard to understand
Seemed relevant in search results, but didn't help me
The information is incorrect
The page contains one or more broken links
 
  Suggest new content or let us know how we can improve this content:

 
  (* Required Fields)   



© 1993 - 2008 Easysoft Limited. All rights reserved.