pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: me@alternize.com
To: pgsql-odbc@postgresql.org
Subject: bug with TextAsLongVarchar=0: output scrambled
Date: Sun, 10 Sep 2006 20:45:01 +0200
Message-ID: <01e401c6d509$3a184990$0201a8c0@iwing> (raw)

hi list

a while ago i posted about a bug with unicode TEXT fields and pgODBC (see below). i now was able to get down to the problem.

if you use TextAsLongVarchar=0 with the latest drivers, then the output from TEXT fields is scrambled. i was able to reproduce this by having a text-field with as low as ~500 chars of data. the output contained invalid charcters at random positions - and as early as after the 240 character. the invalid characters seem to be 0x00 or the like, which of course messes with the application.

here's my full connection string:
Driver={PostgreSQL UNICODE};Server=localhost;Port=5432;Database=mydb;UID=myuser;pwd=mypass;TrueIsMinus1=1;BoolsAsChar=0;TextAsLongVarchar=0;UseDeclareFetch=0

when using TextAsLongVarchar=1, data is returned fine. unfortunately, some of our textfields are longer than longvarchars 8190 limit...
when going back to driver 8.01.0102, TextAsLongVarchar=0 works perfectly. the problem also exists in the latest driver release from august.

- thomas



----- Original Message ----- 
From: me@alternize.com 
To: pgsql-odbc@postgresql.org 
Sent: Friday, March 31, 2006 1:47 PM
Subject: problem with latest stable driver


hi list

probably an old problem, but i wasn't able to follow the list for a while. after we upgraded the odbc version to the latest driver (pgsql: 8.1.3 with odbc: 8.1.2), all unicode TEXT-output was totaly messed up. i wasn't able to find any changelogs descripting changes from the 8.1.1 (where everything works just fine) to 8.1.2 (where ADODB output of TEXT is totaly messed up on our win2k3 system). 

this is probably a known problem by now, but as i wasn't able to find any link to a newer dev-version on pgfoundry, i wanted to ask here what the best steps are to avoid this (aside from downgrading to driver v. 8.1.1)

thanks,
thomas

view thread (3+ messages)  latest in thread

Message-ID: <01e401c6d509$3a184990$0201a8c0@iwing>
Permalink:  ../01e401c6d509$3a184990$0201a8c0@iwing/
Also on:    postgresql.org/message-id/01e401c6d509$3a184990$0201a8c0@iwing

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: me@alternize.com
  Subject: Re: bug with TextAsLongVarchar=0: output scrambled
  In-Reply-To: <01e401c6d509$3a184990$0201a8c0@iwing>
  References: <01e401c6d509$3a184990$0201a8c0@iwing>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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