libiodbc configuration

Trevor S. Cornpropst tcornpropst at
Tue May 6 13:45:09 PDT 2003

On Tuesday 06 May 2003 15:06, Lorin Lund wrote:
> I have MySQL installed on my 4.8 system.
> Libiodbc got installed by installing mSQL,MySQL
> modules for perl.
> Perl access to MySQL worked OK.  So I supposed the
> iODBC was fully configured.  When I tried ODBC
> from another language it didn't work.
> When I tried the test program 'odbctest' it lists
> the field names from .odbc.ini as if they were
> DSNs.  When I access odbc from the language 'J'
> and ask for a list of data sources I get the same
> list as shows up in 'odbctest'.
> I certainly have something messed up!
> (When I couldn't get things to work with iODBC I tried
> installing unixODBC - maybe that messed things up.)
> Does anyone recognize these symptoms?


I think you may have some misunderstandings here, I'll see if I can help. I am 
not familiar with 'J' but I don't think that is at issue here.

ODBC is not needed to connect to MySQL and msql using perl from a FreeBSD 
machine. Perl uses DBD (Database Dependent) drivers to access these 
databases. However, you may still use ODBC if you wish but, why would you? 
MySQL can use myodbc to use ODBC for database connectivity and it depends on 
either unixodbc or libiodbc.

libiodbc was likely installed because you installed 
/usr/ports/databases/p5-DBD-ODBC. libiodbc only provides an ODBC "driver 
manager". You still need to install an ODBC driver for the database you wish 
to connect to. You can find FreeBSD ODBC drivers from that 
work with libiodbc or use their driver manager which is the same thing. They 
released libiodbc ( as an open source version of their ODBC 
driver manager.

It sounds like 'J' is properly configured to use ODBC if you get the same list 
of DSN's within J as you do with odbctest.

1. Have you installed an ODBC database driver for the database you are 
connecting to?
2. Have you configured a DSN in your .odbc.ini and .odbcinst.ini to use that 
driver with the database?
3. What, specifically, are you trying to do?

Trevor Cornpropst

More information about the freebsd-questions mailing list