pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Roebling <robert@roebling.de>
To: PostgreSQL-ODBC-List <pgsql-odbc@postgresql.org>
Subject: Newbie unable to connect through iODBC
Date: Fri, 16 Jan 2004 22:08:01 +0100
Message-ID: <1074287280.8960.29.camel@berlin.roebling.de> (raw)


  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
 




Message-ID: <1074287280.8960.29.camel@berlin.roebling.de>
Permalink:  ../1074287280.8960.29.camel@berlin.roebling.de/
Also on:    postgresql.org/message-id/1074287280.8960.29.camel@berlin.roebling.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: robert@roebling.de
  Subject: Re: Newbie unable to connect through iODBC
  In-Reply-To: <1074287280.8960.29.camel@berlin.roebling.de>
  References: <1074287280.8960.29.camel@berlin.roebling.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox