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: 1074287280.8960.29.camel@berlin.roebling.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-odbc by date

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