Problems connecting via ODBC

Problems connecting via ODBC

am 05.06.2007 22:10:29 von Eric.Christeson

I'm using libiodbc-3.52.5 and psqlodbc-08.02.0400 to connect to a server
running PostgreSQL 8.1.5. When I run the iodbctest with the DSN I have
set up, I get:

1: SQLDriverConnect = The database does not exist on the server
or user authentication failed. (105) SQLSTATE=HY000

The database does exist and I'm able to connect fine via psql.

I have logging turned on in Postgres and the connection is allowed vs.
when I supply an incorrect password and the connection is denied.

Relevent files follow.

;
; odbc.ini
;
[ODBC Data Sources]
pg_ldap=PostgreSQL

[pg_ldap]
Driver=PostgreSQL
Description=Connection to LDAP/POSTGRESQL
Servername=dummyserver.net
Port=5432
Protocol=6.4
UserName=test
Password=test
Database=pg_ldap
ReadOnly=no

[ODBC]
InstallDir=/usr/local/lib

;
; odbcinst.ini
;
[PostgreSQL]
Description=ODBC for PostgreSQL
Driver=/usr/local/lib/psqlodbcw.so

[ODBC]
Trace=1
Debug=1
Pooling=No

PostgreSQL log:

DEBUG: forked new backend, pid=89606 socket=7
LOG: connection received: host=dummyserver.net port=56614
DEBUG: received password packet
LOG: connection authorized: user=test database=pg_ldap
DEBUG: postmaster child[89606]: starting with (
DEBUG: postgres
DEBUG: -v131072
DEBUG: -p
DEBUG: pg_ldap
DEBUG: )
DEBUG: InitPostgres
DEBUG: StartTransaction
DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR,
xid/subid/cid: 115384/1/0, nestlvl: 1, children: <>
DEBUG: CommitTransaction
DEBUG: name: unnamed; blockState: STARTED; state: INPROGR,
xid/subid/cid: 115384/1/0, nestlvl: 1, children: <>
DEBUG: StartTransactionCommand
STATEMENT:
DEBUG: StartTransaction
STATEMENT:
DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR,
xid/subid/cid: 115385/1/0, nestlvl: 1, children: <>
STATEMENT:
LOG: statement:
STATEMENT:
DEBUG: CommitTransactionCommand
STATEMENT:
DEBUG: CommitTransaction
STATEMENT:
DEBUG: name: unnamed; blockState: STARTED; state: INPROGR,
xid/subid/cid: 115385/1/0, nestlvl: 1, children: <>
STATEMENT:
LOG: duration: 1.117 ms statement:
STATEMENT:
DEBUG: proc_exit(0)
DEBUG: shmem_exit(0)
LOG: disconnection: session time: 0:00:00.00 user=test database=pg_ldap
host=dummyserver.net port=56614
DEBUG: exit(0)
DEBUG: reaping dead processes
DEBUG: server process (PID 89606) exited with exit code 0


Any ideas?

Thanks,
Eric

--
Eric J. Christeson
Information Technology Services (701) 231-8693 (Voice)
Room 242C, IACC Building
North Dakota State University, Fargo, ND 58105-5164

PHP is a minor evil perpetrated and created by incompetent amateurs,
whereas Perl is a great and insidious evil, perpetrated by skilled
but perverted professionals. - Jon Ribbens


---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate