pg.ddx.io pgsql-odbc@postgresql.org mailing list archive
help / color / mirror / Atom feedUsername and password from DSN being overwritten (fix included)
3+ messages / 3 participants
[nested] [flat]
* Username and password from DSN being overwritten (fix included)
@ 2006-10-16 22:56 Rick Hair <rhair@bowmansystems.com>
2006-10-17 16:13 ` Re: Username and password from DSN being overwritten (fix Hiroshi Inoue <inoue@tpf.co.jp>
0 siblings, 1 reply; 3+ messages in thread
From: Rick Hair @ 2006-10-16 22:56 UTC (permalink / raw)
To: pgsql-odbc
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.
Thanks,
Rick Hair
*** psqlodbc.old/connection.c 2006-10-13 08:13:31.000000000 -0500
--- psqlodbc.new/connection.c 2006-10-16 17:09:31.000000000 -0500
***************
*** 127,134 ****
* override values from DSN info with UID and authStr(pwd) This only
* occurs if the values are actually there.
*/
! make_string(szUID, cbUID, ci->username, sizeof(ci->username));
! make_string(szAuthStr, cbAuthStr, ci->password, sizeof(ci->password));
/* fill in any defaults */
getDSNdefaults(ci);
--- 127,136 ----
* override values from DSN info with UID and authStr(pwd) This only
* occurs if the values are actually there.
*/
! if (cbUID > 0)
! make_string(szUID, cbUID, ci->username, sizeof(ci->username));
! if (cbAuthStr > 0)
! make_string(szAuthStr, cbAuthStr, ci->password,
sizeof(ci->password));
/* fill in any defaults */
getDSNdefaults(ci);
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Username and password from DSN being overwritten (fix
2006-10-16 22:56 Username and password from DSN being overwritten (fix included) Rick Hair <rhair@bowmansystems.com>
@ 2006-10-17 16:13 ` Hiroshi Inoue <inoue@tpf.co.jp>
2006-10-19 13:30 ` Re: Username and password from DSN being overwritten (fix rhair@bowmansystems.com
0 siblings, 1 reply; 3+ messages in thread
From: Hiroshi Inoue @ 2006-10-17 16:13 UTC (permalink / raw)
To: Rick Hair <rhair@bowmansystems.com>; +Cc: 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
http://www.geocities.jp/inocchichichi/psqlodbc/index.html
.
regards,
Hiroshi Inoue
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Username and password from DSN being overwritten (fix
2006-10-16 22:56 Username and password from DSN being overwritten (fix included) Rick Hair <rhair@bowmansystems.com>
2006-10-17 16:13 ` Re: Username and password from DSN being overwritten (fix Hiroshi Inoue <inoue@tpf.co.jp>
@ 2006-10-19 13:30 ` rhair@bowmansystems.com
0 siblings, 0 replies; 3+ messages in thread
From: rhair@bowmansystems.com @ 2006-10-19 13:30 UTC (permalink / raw)
To: pgsql-odbc
That did the trick; Business Objects seems to be working fine with the
new snapshot.
Thanks,
Rick Hair
Hiroshi Inoue wrote:
>
> 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
> http://www.geocities.jp/inocchichichi/psqlodbc/index.html
> .
>
> regards,
> Hiroshi Inoue
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2006-10-19 13:30 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-10-16 22:56 Username and password from DSN being overwritten (fix included) Rick Hair <rhair@bowmansystems.com>
2006-10-17 16:13 ` Re: Username and password from DSN being overwritten (fix Hiroshi Inoue <inoue@tpf.co.jp>
2006-10-19 13:30 ` Re: Username and password from DSN being overwritten (fix rhair@bowmansystems.com
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