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?
* Please select one option based on your first choice:

(* Required Fields)


Oracle is a registered trademark of Oracle Corporation and/or its affiliates.