pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Text field truncation problem
7+ messages / 2 participants
[nested] [flat]

* Text field truncation problem
@ 2002-11-21 16:45 Graham Vickrage <graham@gpmd.co.uk>
  0 siblings, 0 replies; 7+ messages in thread

From: Graham Vickrage @ 2002-11-21 16:45 UTC (permalink / raw)
  To: pgsql-odbc

I am trying to sort out a problem with ODBC truncating text fields.

I am running Postgres 7.2.3, and using the latest ODBC driver from the
official website. 

When I connect through the windows client I get the message: 

Test2.pl: DBD::ODBC::st fetchrow_hashref failed: Fetched item was
truncated. (SQL-01004)(DBD: st_fetch/SQLFetch (long truncated) err=1)

I have attached the log from the ODBC if that is any use.

Many thanks 

Graham.

Attachments:

  odbc.log (application/octet-stream, 13.6K) download

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

* Text field truncation problem
@ 2002-11-21 17:07 Graham Vickrage <graham@gpmd.co.uk>
  2002-11-22 00:13 ` Re: Text field truncation problem Hiroshi Inoue <Inoue@tpf.co.jp>
  0 siblings, 1 reply; 7+ messages in thread

From: Graham Vickrage @ 2002-11-21 17:07 UTC (permalink / raw)
  To: pgsql-odbc



I am trying to sort out a problem with ODBC truncating text fields.

I am running Postgres 7.2.3, and using the latest ODBC driver from the
official website. 

When I connect through the windows client I get the message: 

Test2.pl: DBD::ODBC::st fetchrow_hashref failed: Fetched item was
truncated. (SQL-01004)(DBD: st_fetch/SQLFetch (long truncated) err=1)

I have attached the log from the ODBC if that is any use.

Many thanks 

Graham.

Attachments:

  odbc.log (application/octet-stream, 13.6K) download

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

* Re: Text field truncation problem
  2002-11-21 17:07 Text field truncation problem Graham Vickrage <graham@gpmd.co.uk>
@ 2002-11-22 00:13 ` Hiroshi Inoue <Inoue@tpf.co.jp>
  2002-11-22 17:10   ` Re: Text field truncation problem Graham Vickrage <graham@gpmd.co.uk>
  0 siblings, 1 reply; 7+ messages in thread

From: Hiroshi Inoue @ 2002-11-22 00:13 UTC (permalink / raw)
  To: Graham Vickrage <graham@gpmd.co.uk>; +Cc: pgsql-odbc

Graham Vickrage wrote:
> 
> I am trying to sort out a problem with ODBC truncating text fields.
> 
> I am running Postgres 7.2.3, and using the latest ODBC driver from the
> official website.
> 
> When I connect through the windows client I get the message:
> 
> Test2.pl: DBD::ODBC::st fetchrow_hashref failed: Fetched item was
> truncated. (SQL-01004)(DBD: st_fetch/SQLFetch (long truncated) err=1)
> 
> I have attached the log from the ODBC if that is any use.

Judging from the log, your program is binding a (80+1) byte
buffer for the "description" text field. I don't understand
where the 80(or 81) come from. OTOH your program seems to be
binding the "name" field with a right(50+1 byte) sized buffer.

regards,
Hiroshi Inoue
	http://w2422.nsk.ne.jp/~inoue/



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

* Re: Text field truncation problem
  2002-11-21 17:07 Text field truncation problem Graham Vickrage <graham@gpmd.co.uk>
  2002-11-22 00:13 ` Re: Text field truncation problem Hiroshi Inoue <Inoue@tpf.co.jp>
@ 2002-11-22 17:10   ` Graham Vickrage <graham@gpmd.co.uk>
  0 siblings, 0 replies; 7+ messages in thread

From: Graham Vickrage @ 2002-11-22 17:10 UTC (permalink / raw)
  To: 'Hiroshi Inoue' <Inoue@tpf.co.jp>; +Cc: pgsql-odbc

So should all the data types be 50+1 bytes, I don't know much about this
sort of thing and really need to get this going. Are there any docs,
resources anyone knows about where I can try and locate the issue. Is it
likely to be a driver problem, postgreSQL, NT problem. Where do I
start????

Please heeeeeeeeeeeeeeeelp.

Thanks again

Graham 

-----Original Message-----
From: Hiroshi Inoue [mailto:Inoue@tpf.co.jp] 
Sent: 22 November 2002 00:14
To: Graham Vickrage
Cc: pgsql-odbc@postgresql.org
Subject: Re: [ODBC] Text field truncation problem


Graham Vickrage wrote:
> 
> I am trying to sort out a problem with ODBC truncating text fields.
> 
> I am running Postgres 7.2.3, and using the latest ODBC driver from the

> official website.
> 
> When I connect through the windows client I get the message:
> 
> Test2.pl: DBD::ODBC::st fetchrow_hashref failed: Fetched item was 
> truncated. (SQL-01004)(DBD: st_fetch/SQLFetch (long truncated) err=1)
> 
> I have attached the log from the ODBC if that is any use.

Judging from the log, your program is binding a (80+1) byte buffer for
the "description" text field. I don't understand where the 80(or 81)
come from. OTOH your program seems to be binding the "name" field with a
right(50+1 byte) sized buffer.

regards,
Hiroshi Inoue
	http://w2422.nsk.ne.jp/~inoue/






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

* Re: Text field truncation problem
@ 2002-11-22 18:17 Graham Vickrage <graham@gpmd.co.uk>
  2002-11-24 00:14 ` Re: Text field truncation problem Hiroshi Inoue <Inoue@tpf.co.jp>
  0 siblings, 1 reply; 7+ messages in thread

From: Graham Vickrage @ 2002-11-22 18:17 UTC (permalink / raw)
  To: 'Hiroshi Inoue' <Inoue@tpf.co.jp>; +Cc: pgsql-odbc

Further to my e-mail below, I have tried the same thing on a production
database running a different version of Linux / Postgres. I have tried
this on two separate clients NT and XP and they all have the same
problem! Should I start shopping around for a different ODBC driver?

Can anyone shed some light on this, surely my set up is pretty
standard???

Thanks again,

Graham

-----Original Message-----
From: Graham Vickrage [mailto:graham@gpmd.co.uk] 
Sent: 22 November 2002 17:11
To: 'Hiroshi Inoue'
Cc: 'pgsql-odbc@postgresql.org'
Subject: RE: [ODBC] Text field truncation problem


So should all the data types be 50+1 bytes, I don't know much about this
sort of thing and really need to get this going. Are there any docs,
resources anyone knows about where I can try and locate the issue. Is it
likely to be a driver problem, postgreSQL, NT problem. Where do I
start????

Please heeeeeeeeeeeeeeeelp.

Thanks again

Graham 

-----Original Message-----
From: Hiroshi Inoue [mailto:Inoue@tpf.co.jp] 
Sent: 22 November 2002 00:14
To: Graham Vickrage
Cc: pgsql-odbc@postgresql.org
Subject: Re: [ODBC] Text field truncation problem


Graham Vickrage wrote:
> 
> I am trying to sort out a problem with ODBC truncating text fields.
> 
> I am running Postgres 7.2.3, and using the latest ODBC driver from the
> official website.
> 
> When I connect through the windows client I get the message:
> 
> Test2.pl: DBD::ODBC::st fetchrow_hashref failed: Fetched item was
> truncated. (SQL-01004)(DBD: st_fetch/SQLFetch (long truncated) err=1)
> 
> I have attached the log from the ODBC if that is any use.

Judging from the log, your program is binding a (80+1) byte buffer for
the "description" text field. I don't understand where the 80(or 81)
come from. OTOH your program seems to be binding the "name" field with a
right(50+1 byte) sized buffer.

regards,
Hiroshi Inoue
	http://w2422.nsk.ne.jp/~inoue/






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

* Re: Text field truncation problem
  2002-11-22 18:17 Re: Text field truncation problem Graham Vickrage <graham@gpmd.co.uk>
@ 2002-11-24 00:14 ` Hiroshi Inoue <Inoue@tpf.co.jp>
  2002-11-25 02:26   ` Re: Text field truncation problem Hiroshi Inoue <Inoue@tpf.co.jp>
  0 siblings, 1 reply; 7+ messages in thread

From: Hiroshi Inoue @ 2002-11-24 00:14 UTC (permalink / raw)
  To: Graham Vickrage <graham@gpmd.co.uk>; +Cc: pgsql-odbc

> -----Original Message-----
> From: Graham Vickrage [mailto:graham@gpmd.co.uk]
> 
> Further to my e-mail below, I have tried the same thing on a production
> database running a different version of Linux / Postgres. I have tried
> this on two separate clients NT and XP and they all have the same
> problem! Should I start shopping around for a different ODBC driver?
> 
> Can anyone shed some light on this, surely my set up is pretty
> standard???

If the max length of the "descriptor" < 255, please turn off
the "Text As LongVarChar" DSN option.

regards,
Hiroshi Inoue



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

* Re: Text field truncation problem
  2002-11-22 18:17 Re: Text field truncation problem Graham Vickrage <graham@gpmd.co.uk>
  2002-11-24 00:14 ` Re: Text field truncation problem Hiroshi Inoue <Inoue@tpf.co.jp>
@ 2002-11-25 02:26   ` Hiroshi Inoue <Inoue@tpf.co.jp>
  0 siblings, 0 replies; 7+ messages in thread

From: Hiroshi Inoue @ 2002-11-25 02:26 UTC (permalink / raw)
  To: Graham Vickrage <graham@gpmd.co.uk>; +Cc: pgsql-odbc



Hiroshi Inoue wrote:
> 
> > -----Original Message-----
> > From: Graham Vickrage [mailto:graham@gpmd.co.uk]
> >
> > Further to my e-mail below, I have tried the same thing on a production
> > database running a different version of Linux / Postgres. I have tried
> > this on two separate clients NT and XP and they all have the same
> > problem! Should I start shopping around for a different ODBC driver?
> >
> > Can anyone shed some light on this, surely my set up is pretty
> > standard???
> 
> If the max length of the "descriptor" < 255, please turn off
> the "Text As LongVarChar" DSN option.

Or set the LongReadLen or LongTruncOk attribute 
before calling prepare.

regards,
Hiroshi Inoue
	http://w2422.nsk.ne.jp/~inoue/



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


end of thread, other threads:[~2002-11-25 02:26 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-11-21 16:45 Text field truncation problem Graham Vickrage <graham@gpmd.co.uk>
2002-11-21 17:07 Text field truncation problem Graham Vickrage <graham@gpmd.co.uk>
2002-11-22 00:13 ` Hiroshi Inoue <Inoue@tpf.co.jp>
2002-11-22 17:10   ` Graham Vickrage <graham@gpmd.co.uk>
2002-11-22 18:17 Re: Text field truncation problem Graham Vickrage <graham@gpmd.co.uk>
2002-11-24 00:14 ` Hiroshi Inoue <Inoue@tpf.co.jp>
2002-11-25 02:26   ` Hiroshi Inoue <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