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

Re: Username and password from DSN being overwritten (fix

From: Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp>
To: Rick Hair <rhair(at)bowmansystems(dot)com>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: Username and password from DSN being overwritten (fix
Date: 2006-10-17 16:13:45
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-odbc
Rick Hair wrote:
> Hi all,
> I ran into a problem recently trying to use the latest CVS version of the
> ODBC driver with Business Objects XI Release 2. The username and password
> specified for a connection in the ODBC setup panel were being ignored by the
> driver. I discovered that after some recent changes to the make_string()
> function in misc.c, the DSN defaults were always being overwritten by
> whatever username and password were passed to PGAPI_Connect(), even if they
> were empty strings.
> Below is a (very small) patch to connection.c to work around the issue.
> !     if (cbUID > 0)
> !           make_string(szUID, cbUID, ci->username, sizeof(ci->username));
> !     if (cbAuthStr > 0)
> !           make_string(szAuthStr, cbAuthStr, ci->password,
> sizeof(ci->password));

The above patch seems to be wrong because cbUID(cvAuthStr) can be SQL_NTS.
OK I would take care of this case.
Please try the snapshot dll at

Hiroshi Inoue

In response to


pgsql-odbc by date

Next:From: Mark Morgan LloydDate: 2006-10-17 20:46:14
Subject: Installation on NT4 revisited
Previous:From: Rick HairDate: 2006-10-16 22:56:24
Subject: Username and password from DSN being overwritten (fix included)

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