Newbie unable to connect through iODBC - Mailing list pgsql-odbc

From Robert Roebling
Subject Newbie unable to connect through iODBC
Date
Msg-id 1074287280.8960.29.camel@berlin.roebling.de
Whole thread Raw
List pgsql-odbc
  Hello,

I am not sure if this is the right place to ask, but
I didn't find any better place. I am trying to connect
to a simple test PostgreSQL 7.3.4 database through iODBC
(or any ODBC, actually). I am using SuSE 9.0 in a mostly
unmodified way - it ships with PostgreSQL, psqlodbc.so
and iODBC or UnixODBC alternatively. I created a test
database "test2" as Unix and PostgreSQL user "robert".
I am able to connect to the database with "psql test2"
and also using pgaccess (after enable TCP connections).
But whatever I try with ODBC, I don't get through. I
think it is an access or privilege thing. I changed my
pg_hba.conf to allow any access:

local  all  all                                trust
host   all  all   127.0.0.1   255.255.255.255  trust
local  all  all   ident   sameuser

My .odbc.ini looks like this:

[ODBC Data Sources]
test2    = PostgreSQL

[test2]
Driver      = /usr/lib/psqlodbc.so
Description = Test for Test2
DSN         = test2
Database    = test2
Port        = 5432
ServerType  = Postgres
Protocol    = 7.3
Username    = robert
Password    = robert
ReadOnly    = No
Trace       = 1

[ODBC]
Trace         = 1
TraceAutoStop = 0
TraceFile     = sql.log

When running testodbc from the iODBC distribution (I have
tried several versions, currently the latest iODBC from
their webpage). I get this in the log file's end:

iodbctest       00004000 ENTER SQLDriverConnect
        SQLHDBC           0x804b5f0
        SQLPOINTER        0x0
        SQLCHAR         * 0xbffff190
                  | DSN=test2;UID=robert;PWD=robert                  |
        SQLSMALLINT       -3 (SQL_NTS)
        SQLCHAR         * 0xbffff210
        SQLSMALLINT       257
        SQLSMALLINT     * 0xbfffef5a
        SQLUSMALLINT      1 (SQL_DRIVER_COMPLETE)

saying that in odbctest.c, the call to SQLDriverConnect( .. )
doesn't return SQL_SUCCESS. Can anyone give me a clue?

  Thanks in advance,

     Robert



pgsql-odbc by date:

Previous
From: "Goulet, Dick"
Date:
Subject: Re: linked tables Access <---> PG 7.4.1
Next
From: Andreas
Date:
Subject: ms-access and booleans ?