pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Re: B7 option
4+ messages / 2 participants
[nested] [flat]

* Re: B7 option
@ 2013-07-31 14:29  Barry Bell <Barry_Bell@harte-hanks.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Barry Bell @ 2013-07-31 14:29 UTC (permalink / raw)
  To: Hiroshi Inoue <inoue@tpf.co.jp>; Frank A. U. <fau@email.com>; +Cc: pgsql-odbc

Hi:
  I was using the last odbc driver (9.1.200) to get a character field with CR and LF.
With the following connection string, the last character was getting cut off (When a CR LF was in the fied).
Driver={PostgreSQL UNICODE};Server= server.servicer.com;Port=5432;Database=dbname;Uid=user;Pwd=pwd;BI=2;TextAsLongVarchar=1;UnknownSizes=2;UseServerSidePrepare=1; B0=254;B7=0;C5=1;

Changing the B7 to B7=0 corrects the issue (no cut off at the end)

Driver={PostgreSQL UNICODE};Server= server.servicer.com;Port=5432;Database=dbname;Uid=user;Pwd=pwd;BI=2;TextAsLongVarchar=1;UnknownSizes=2;UseServerSidePrepare=1; B0=254;B7=1;C5=1;

Documentation on the B7 is a little scarce but most say the B7 is the same as the TextasLongVarchar, but changing the TextaslongVarchar has no offection on this option.

What happens when the B7 is set 0?   (and textaslongvarhar=1)


-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc


^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: B7 option
@ 2013-08-01 03:20  Inoue, Hiroshi <inoue@tpf.co.jp>
  parent: Barry Bell <Barry_Bell@harte-hanks.com>
  0 siblings, 2 replies; 4+ messages in thread

From: Inoue, Hiroshi @ 2013-08-01 03:20 UTC (permalink / raw)
  To: Barry Bell <Barry_Bell@harte-hanks.com>; +Cc: Frank A. U. <fau@email.com>; pgsql-odbc

Hi Barry,

(2013/07/31 23:29), Barry Bell wrote:
> Hi:
>    I was using the last odbc driver (9.1.200) to get a character field with CR and LF.
> With the following connection string, the last character was getting cut off (When a CR LF was in the fied).
> Driver={PostgreSQL UNICODE};Server= server.servicer.com;Port=5432;Database=dbname;Uid=user;Pwd=pwd;BI=2;TextAsLongVarchar=1;UnknownSizes=2;UseServerSidePrepare=1; B0=254;B7=0;C5=1;

Contradictory options TextAsLongVarchar=1 and B7=0 are specified.
Psqlodbc drivers eat the tokens one by one and overwrite the former
option by the latter one after all.

> Changing the B7 to B7=0 corrects the issue (no cut off at the end)

Changing to B7=1?

> Driver={PostgreSQL UNICODE};Server= server.servicer.com;Port=5432;Database=dbname;Uid=user;Pwd=pwd;BI=2;TextAsLongVarchar=1;UnknownSizes=2;UseServerSidePrepare=1; B0=254;B7=1;C5=1;
>
> Documentation on the B7 is a little scarce but most say the B7 is the same as the TextasLongVarchar, but changing the TextaslongVarchar has no offection on this option.
>
> What happens when the B7 is set 0?   (and textaslongvarhar=1)





-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* FW: B7 option
@ 2013-08-01 12:40  Barry Bell <Barry_Bell@harte-hanks.com>
  parent: Inoue, Hiroshi <inoue@tpf.co.jp>
  1 sibling, 0 replies; 4+ messages in thread

From: Barry Bell @ 2013-08-01 12:40 UTC (permalink / raw)
  To: pgsql-odbc


If there a is a LF(char(10) inside a string and the B7=1, the string returned by the driver will cut off 1 character for each LF(chr(10) inside the string.
If the B7=0 the full string si returned.

Field='ABC (LF)123'

Ex:  B7=1
Field='ABC (LF)12'
EX B7=0:
Field='ABC (LF)123'

Any idea why a chr(10) (LF) in a field would cause this?

-----Original Message-----
From: pgsql-odbc-owner@postgresql.org [mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Inoue, Hiroshi
Sent: Wednesday, July 31, 2013 11:20 PM
To: Barry Bell
Cc: Frank A. U.; psql-odbc
Subject: Re: [ODBC] B7 option

Hi Barry,

(2013/07/31 23:29), Barry Bell wrote:
> Hi:
>    I was using the last odbc driver (9.1.200) to get a character field with CR and LF.
> With the following connection string, the last character was getting cut off (When a CR LF was in the fied).
> Driver={PostgreSQL UNICODE};Server= 
> server.servicer.com;Port=5432;Database=dbname;Uid=user;Pwd=pwd;BI=2;Te
> xtAsLongVarchar=1;UnknownSizes=2;UseServerSidePrepare=1; 
> B0=254;B7=0;C5=1;

Contradictory options TextAsLongVarchar=1 and B7=0 are specified.
Psqlodbc drivers eat the tokens one by one and overwrite the former option by the latter one after all.

> Changing the B7 to B7=0 corrects the issue (no cut off at the end)

Changing to B7=1?

> Driver={PostgreSQL UNICODE};Server= 
> server.servicer.com;Port=5432;Database=dbname;Uid=user;Pwd=pwd;BI=2;Te
> xtAsLongVarchar=1;UnknownSizes=2;UseServerSidePrepare=1; 
> B0=254;B7=1;C5=1;
>
> Documentation on the B7 is a little scarce but most say the B7 is the same as the TextasLongVarchar, but changing the TextaslongVarchar has no offection on this option.
>
> What happens when the B7 is set 0?   (and textaslongvarhar=1)


-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc


^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: B7 option
@ 2013-08-02 00:04  Inoue, Hiroshi <inoue@tpf.co.jp>
  parent: Inoue, Hiroshi <inoue@tpf.co.jp>
  1 sibling, 0 replies; 4+ messages in thread

From: Inoue, Hiroshi @ 2013-08-02 00:04 UTC (permalink / raw)
  To: Barry Bell <Barry_Bell@harte-hanks.com>; +Cc: Frank A. U. <fau@email.com>; pgsql-odbc

(2013/08/01 21:36), Barry Bell wrote:
> If there a is a LF(char(10) inside a string and the B7=1, the string returned by the driver will cut off 1 character for each LF(chr(10) inside the string.
> If the B7=0 the full string si returned.
>
> Field='ABC (LF)123'
>
> Ex:  B7=1
> Field='ABC (LF)12'
> EX B7=0:
> Field='ABC (LF)123'
>
> Any idea why a chr(10) (LF) in a field would cause this?

Seems there are some bugs in LF<->CRLF conversions.
I would examine it.

Anyway please specify *LFconversion=0* or *C5=0* in your
connection string to suppress LF<->CRLF conversion.

regards,
Hiroshi Inoue




-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2013-08-02 00:04 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-07-31 14:29 Re: B7 option Barry Bell <Barry_Bell@harte-hanks.com>
2013-08-01 03:20 ` Inoue, Hiroshi <inoue@tpf.co.jp>
2013-08-01 12:40   ` Barry Bell <Barry_Bell@harte-hanks.com>
2013-08-02 00:04   ` Inoue, Hiroshi <inoue@tpf.co.jp>

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