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

Newbie unable to connect through iODBC

From: Robert Roebling <robert(at)roebling(dot)de>
To: PostgreSQL-ODBC-List <pgsql-odbc(at)postgresql(dot)org>
Subject: Newbie unable to connect through iODBC
Date: 2004-01-16 21:08:01
Message-ID: (view raw or whole thread)
Lists: pgsql-odbc

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,
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  trust
local  all  all   ident   sameuser

My .odbc.ini looks like this:

[ODBC Data Sources]
test2    = PostgreSQL

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

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

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

  Thanks in advance,


pgsql-odbc by date

Next:From: AndreasDate: 2004-01-18 03:08:15
Subject: ms-access and booleans ?
Previous:From: Cristy N.Date: 2004-01-16 17:31:09
Subject: error 3669 in psql 7.2

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