Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id CC4A09FB2BE for ; Mon, 30 Oct 2006 14:37:44 -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 16524-09 for ; Mon, 30 Oct 2006 18:37:41 +0000 (UTC) X-Greylist: delayed 00:18:03.155515 by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id EAD119FB21D for ; Mon, 30 Oct 2006 14:37:40 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from webmail.hitv.ru (webmail.hitv.ru [217.66.16.37]) by svr4.postgresql.org (Postfix) with ESMTP id 670B05AF032 for ; Mon, 30 Oct 2006 18:19:36 +0000 (GMT) Received: from samatov ([10.2.13.133]) by webmail.hitv.ru (8.13.5/8.13.5) with SMTP id k9UIJXgH082788 for ; Mon, 30 Oct 2006 21:19:33 +0300 (MSK) (envelope-from nfsr@hitv.ru) X-AntiVirus: Checked by Dr.Web [version: 4.33, engine: 4.33.5.10110, virus records: 150796, updated: 30.10.2006] Message-ID: <015a01c6fc4f$f36164a0$39a7fea9@samatov> From: =?koi8-r?B?7ubz8g==?= To: Subject: When length of text data is 1. Date: Mon, 30 Oct 2006 21:19:33 +0300 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="koi8-r"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=BAYES_50 X-Spam-Level: X-Archive-Number: 200611/4 X-Sequence-Number: 8386 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. If I catch exception, nm equals 'J', but when application exits, Memory Leaks is detected. And I think, catching exception and then checking emptyness of exception message is not good solution... So, question... Is this bug in my code or in MFC code or in ODBC driver's code? What I should do to support strings with length == 1? Thank you if you can help me.. Best regards, Nail Samatov