Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id D38EF9FB550 for ; Tue, 17 Oct 2006 13:35:21 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 40881-03-2 for ; Tue, 17 Oct 2006 13:35:11 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34]) by postgresql.org (Postfix) with SMTP id 3E6E49FB56F for ; Tue, 17 Oct 2006 13:13:48 -0300 (ADT) Received: (qmail 22833 invoked from network); 18 Oct 2006 01:13:46 +0900 X-Authentication: inoue was authenticated by ftp.tpf.co.jp at 18 Oct 2006 01:13:46 +0900 Received: from unknown (HELO ?192.168.11.2?) (219.61.40.6) by ftp.tpf.co.jp with SMTP; 18 Oct 2006 01:13:46 +0900 Message-ID: <45350139.4080408@tpf.co.jp> Date: Wed, 18 Oct 2006 01:13:45 +0900 From: Hiroshi Inoue User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: Rick Hair CC: pgsql-odbc@postgresql.org Subject: Re: Username and password from DSN being overwritten (fix References: <005301c6f176$4e4111c0$1103000a@RickHair> In-Reply-To: <005301c6f176$4e4111c0$1103000a@RickHair> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.02 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200610/46 X-Sequence-Number: 8309 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