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

Re: When length of text data is 1.

From: Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp>
To: НФСР <nfsr(at)hitv(dot)ru>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: When length of text data is 1.
Date: 2006-11-07 03:34:02
Message-ID: 454FFEAA.1020001@tpf.co.jp (view raw or flat)
Thread:
Lists: pgsql-odbc
НФСР 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

In response to

pgsql-odbc by date

Next:From: Trevor RieverDate: 2006-11-08 14:47:26
Subject: Help building 08.02.0200 on Solaris 10 (sparc)
Previous:From: Hiroshi InoueDate: 2006-11-07 01:10:18
Subject: Re: Fwd: Bug#396218: bind.c: bad handling of SQL_LEN_DATA_AT_EXEC

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