Re: HELP: Informix 5, Varchar / Char types / Powerbuilder 4
Posted in 1996
This sounds more like you have used dbaccess/isql to write an SQL
statement with a long literal string. There is a maximum of 255
characters for such strings. I don't know for sure, but I think this
limit applies to ESQL/C and 4GL as well.
The solution is to use a variable in some language (C, 4GL or whatever
you are using) and insert the content of that into your database
field. That works fine.
"Clyde H. Bryant" <cbryant@primenet.com> wrote:
:Hans Nieuwenburg wrote:
:>
:> The Informix 5 varchar type can onle be 255 characters long while the char
:> type can be mutch longer. In a database we first had a vanchar field and
:> converted that to char to enlarge the field to 4096, somehow the database
:> comes back with an error when we try to insert a record with text longer
:> then 255 characters the message we get is: -280
:>
:> This is the meaning of -280 from the informix help file:
:> "-280
:>
:> A quoted string exceeds 256 bytes.
:>
:> Somewhere in this statement there is a character literal that exceeds the
:> maximum allowed. Inspect the statement, checking the punctuation and
:> length of all quoted strings. Possibly two quotes are missing, making a
:> long string out of two short ones. If you intended to use a string of
:> this length, you will have to revise the statement. There is no means for
:> writing such a long character string in an SQL statement.
:> "
:>
:> How can we solve this, according to the table configuration this field is
:> 4096 bytes long!
:>
:> Please HELP! (i'm in despere)
:Sound like the engine still thinks the column type is varchar
:and not char. Check syscolumns for the data type ("coltype,
:collength"). I guess you could unload the table then drop the
:table and re-create it with the column as char(4096) which is
:a big column. Why not define it as a text column?
:Hope this helps
: Clyde
Nils.Myklebust@idg.no
NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway
My opinions are those of my company
The Informix FAQ is at http://www.iiug.org