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

Re: Incorrect Column Width For Text Columns

From: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
To: cnliou(at)eurosport(dot)com
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: Incorrect Column Width For Text Columns
Date: 2002-01-09 10:11:07
Message-ID: 3C3C173B.775A6120@tpf.co.jp (view raw or flat)
Thread:
Lists: pgsql-odbc
cnliou(at)eurosport(dot)com wrote:
> 
> Greetings!
> 
> I use Borland product with postgresql 7.1.3 and
> psqlODBC 7.01.0009.  I also created many text columns
> in postgresql tables. My problems are:
> 
> (1) If "Text as LongVarChar" is checked, the text
> columns become memo fields in delphi. Memo fields are
> extremely difficult to manipulate. My application is
> completely not usable with all these memo fields.
> 
> (2) If "Text as LongVarChar" is unchecked, delphi
> treats the text columns properly except it gets (via
> psqlODBC?) the wrong text column width. It sometimes
> gets the text column width based on  the longest data
> of all the rows in the result set, sometimes not (by
> randomly assuming a very short one).  Thus I can not
> enter more than, say 15, bytes of characters in text
> columns.

How are you setting the *Unknown Sizes* option ?

> What I need is automatic field widths with no length
> limitation in delphi app for all postgresql text
> columns. How do I get this?

If you set the *Unknown Sizes* options as *Maximum*
you would probably get 254.

> If it is not possible to acquire the automatic field
> width for text columns, I would much appreciate if
> anyone could show me how to set a little longer fixed
> width, say 300 bytes, for all text columns.

Possibly you could increase *Max Varchar* size with
*Maximum* *Unknown Sizes* option. However I can
guarantee nothing because text fields larger than 255
bytes could no longer be SQL_VARCHAR in ODBC spec.

regards,
Hiroshi Inoue

In response to

pgsql-odbc by date

Next:From: cnliouDate: 2002-01-10 04:17:17
Subject: Rep:Re: Incorrect Column Width For Text Columns
Previous:From: cnliouDate: 2002-01-09 09:24:47
Subject: Incorrect Column Width For Text Columns

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