Skip site navigation (1) Skip section navigation (2)

iODBC vs unixODBC (which to use)

From: Laura Vance <vancel(at)winfreeacademy(dot)com>
To: pgsql-odbc(at)postgresql(dot)org
Subject: iODBC vs unixODBC (which to use)
Date: 2005-08-03 15:57:28
Message-ID: 42F0E968.6090808@winfreeacademy.com (view raw or flat)
Thread:
Lists: pgsql-odbc
I've been trying to install ODBC to connect to a postgresql backend, and 
I've searched the net for examples in C++, but I can't seem to find much 
other than on the unixODBC site, and their example compiles, but I can't 
connect to my database.  I get to a point where the environment has been 
created, then the database handle is created, but when I try to connect 
to the database, it fails with:

SQLDriverConnect = Missing server name, port, or database name in call 
to CC_connect. (201) SQLSTATE=IM002


Which version of the system ODBC is better to use:  iODBC or unixODBC  
If I have both versions installed, will it cause a problem?

Are the two versions compatible?

Which version does perl DBI / DBD::Pg use (if it even uses the system 
ODBC drivers)?  (I got my perl apps to work, but I'm not having as much 
success with my C++ apps).

Here are my installed packages for postgresql and odbc:

# rpm -q -a | grep -i odbc
unixODBC-2.0.8-7mdk
libiodbc-3.52.2-1
libunixODBC2-2.0.8-7mdk
unixODBC-gui-gtk-2.0.8-7mdk
libiodbc-admin-3.52.2-1
postgresql-odbc-7.1.2-19mdk
libiodbc-devel-3.52.2-1


# rpm -q -a | grep -i postgres
postgresql-server-7.1.2-19mdk
postgresql-libs-7.1.2-19mdk
postgresql-perl-7.1.2-19mdk
postgresql-devel-7.1.2-19mdk
postgresql-7.1.2-19mdk
postgresql-odbc-7.1.2-19mdk

Yes, I know it's an old version, but I need to convert to ODBC before I 
upgrade, and I hope that it'll be more of a standard interface.  When I 
had to upgrade our apps server, the proprietary PostgreSQL drivers were 
changed enough that the apps wouldn't work.  Since ODBC is a standard 
interface, it shouldn't matter which version of the proprietary driver 
is used as long as I use standard ODBC function calls.  Which brings up 
another point.  There are some functions and prototypes defined in each 
of the ODBC versions that do not match in the other, so is ODBC truely 
standardized?

Thanks for any help.

-- 
Thanks,
Laura Vance
Systems Engineer




pgsql-odbc by date

Next:From: Zoltan BoszormenyiDate: 2005-08-03 18:08:28
Subject: Re: New libpq based driver snapshot 08.01.0003 available
Previous:From: Dave PageDate: 2005-08-03 15:18:10
Subject: New libpq based driver snapshot 08.01.0003 available

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group