From: | Don Isgitt <djisgitt(at)soundenergy(dot)com> |
---|---|
To: | Don Isgitt <djisgitt(at)soundenergy(dot)com> |
Cc: | postgresql general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Failing ODBC connection |
Date: | 2003-07-09 18:35:19 |
Message-ID: | 3F0C6067.50704@soundenergy.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Never mind; simply adding the username and password as separate
parameters after the DSN part works. Strange to me, though, since the
DSN already contains that information.
Don Isgitt wrote:
> Hello,
>
> I am using pg 7.2.4 on a Linux host, and have recently written a
> Perl/Perl:Tk application that works as expected when run from the
> local host. Unfortunately, the proposed users are on Windows machines,
> and when I try to run the same application there, I get the following
> error:
>
> DBI connect('pg-gds2','HASH(0x1f03458)',...) failed: FATAL 1: user
> "HASH(0x1f0
> 458)" does not exist
> (SQL-28000)
> [Microsoft][ODBC Driver Manager] The driver doesn't support the
> version of ODBC
> behavior that the application requested (see SQLSetEnvAttr).
> (SQL-01000)(DBD: d
> _login/SQLConnect err=-1) at C:\Perl\code\db_edit.pl line 200
> Tk::Error: Can't connect to: FATAL 1: user "HASH(0x1f03458)" does not
> exist
> (SQL-28000)
> [Microsoft][ODBC Driver Manager] The driver doesn't support the
> version of ODBC
> behavior that the application requested (see SQLSetEnvAttr).
> (SQL-01000)(DBD: d
> _login/SQLConnect err=-1)
> [\&main::bld_sql]
> Tk callback for .button
> Tk::__ANON__ at C:/Perl/site/lib/Tk.pm line 228
> Tk::Button::butUp at C:/Perl/site/lib/Tk/Button.pm line 111
> (command bound to event)
>
> Relevant perl code is
>
> $dbh = DBI->connect("dbi:ODBC:pg-gds2",{AutoCommit=>0}) or die "Can't
> connect to: $DBI::errstr\n";
>
> pg-gds2 is an ODBC DSN; the ODBC driver version is 7.2.5.
> I also tried replacing the DSN with all the parameters
> (driver,server,host,uid,pwid) on the call line with the same results.
>
> Just for the sake of completeness, I can ping the server and telnet to
> the server from the Windows machine, and pgadmin2 also works perfectly
> (does it use ODBC?)
>
> pg_hba.conf is: (not connected to outside world!)
>
> # TYPE DATABASE IP_ADDRESS MASK AUTH_TYPE
> AUTH_ARGUMENT
>
> local all trust
> host all 127.0.0.1 255.255.255.255 trust
> host all 10.0.1.0 255.255.255.0 trust
>
>
>
> The perl (and Tk and DBD/DBI) were just downloaded from ActiveState.
>
> I am not terribly literate in Windows, much less ODBC, so any help is
> appreciated.
>
> Thank you very much,
>
> Don
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | John Goetsch | 2003-07-09 18:39:22 | Date Math |
Previous Message | Don Isgitt | 2003-07-09 16:32:01 | Failing ODBC connection |