Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 17AEF9F9EF5 for ; Mon, 6 Nov 2006 23:34:12 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 04054-05 for ; Tue, 7 Nov 2006 03:34:08 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sd.tpf.co.jp (smtp.tpf.co.jp [210.161.239.34]) by postgresql.org (Postfix) with SMTP id C789F9F9429 for ; Mon, 6 Nov 2006 23:34:06 -0400 (AST) Received: (qmail 673 invoked from network); 7 Nov 2006 12:34:04 +0900 Received: from unknown (HELO ?100.0.32.170?) (100.0.32.170) by sd2.tpf-fw-c.co.jp with SMTP; 7 Nov 2006 12:34:04 +0900 Message-ID: <454FFEAA.1020001@tpf.co.jp> Date: Tue, 07 Nov 2006 12:34:02 +0900 From: Hiroshi Inoue User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: =?KOI8-R?Q?=EE=E6=F3=F2?= CC: pgsql-odbc@postgresql.org Subject: Re: When length of text data is 1. References: <015a01c6fc4f$f36164a0$39a7fea9@samatov> In-Reply-To: <015a01c6fc4f$f36164a0$39a7fea9@samatov> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/11 X-Sequence-Number: 8393 ожут wrote: > Hello, > > I tried to search in Internet, but didn't find answer... > I'm using PostgreSQL 8.1.5-1, ODBC, MS Visual C++ with MFC, I'm using > Unicode (database has UTF8 encoding and I'm using "PostgreSQL Unicode" odbc > driver). > I create, for example, such table: > > ***code*** > CREATE TABLE section ( > idsection INT PRIMARY KEY,") > idparent INT NULL REFERENCES section ON DELETE CASCADE,") > name TEXT NOT NULL") > ); > ********** > > Retrieve data thereby: > > ***code*** > CRecordset rcrd(&db); > CString nm; > .... > rcrd.GetFieldValue(_T("name"),nm); > ********** > > It works without any problem except when length of 'name' is 1. > For example, It works fine when name is 'John' but when name is 'J' line > rcrd.GetFieldValue(_T("name"),nm); > throws exception with empty exception message and AFAIK with return code > SQL_NO_DATA. Which version of ODBC driver are you using ? Could you send me the Mylog output ? regards, Hiroshi Inoue