X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 36EF852800 for ; Wed, 3 Aug 2005 12:57:32 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 98458-08 for ; Wed, 3 Aug 2005 15:57:21 +0000 (GMT) Received: from mail.winfreeacademy.com (unknown [12.45.130.164]) by svr1.postgresql.org (Postfix) with ESMTP id 8437052851 for ; Wed, 3 Aug 2005 12:57:20 -0300 (ADT) Received: from vams.winfreeacademy.com (localhost.localdomain [127.0.0.1]) by mail.winfreeacademy.com (Postfix) with SMTP id B0A581A965 for ; Wed, 3 Aug 2005 10:58:30 -0500 (CDT) Received: from winfreeacademy.com (ns1.winfreeacademy.com [12.45.130.162]) by mail.winfreeacademy.com (Postfix) with ESMTP id 691F91A965 for ; Wed, 3 Aug 2005 10:58:30 -0500 (CDT) Message-ID: <42F0E968.6090808@winfreeacademy.com> Date: Wed, 03 Aug 2005 10:57:28 -0500 From: Laura Vance Organization: WACS User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-odbc@postgresql.org Subject: iODBC vs unixODBC (which to use) Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AntiVirus: Scanned By Vexira Mail Shield X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200508/36 X-Sequence-Number: 5675 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