String Advice
Posted in 2003
Topics: Data Types & Schema Design, Versions, Editions & End-of-Life
Hello, I am running IDS 7.31 TC4 on a Windows NT4 SP6 platform. In one particular table designed to hold engineer's comments, I defined a field of type VARCHAR(255,100). Very good until it was decided more comment space was necessary. I am at the limits for VARCHAR and felt, due to the variation of size of these comments (some are still less than 100 bytes), that type TEXT using a 4KB page for each field was a bit too wasteful. I changed the field in question to type CHAR(350) however when I try and update or insert records, I am receiving the error message 'A quoted string exceeds 256 bytes'. I am not sure what is upset by the length of the string. Would someone please be so kind as to enlighten me and perhaps give me some advice as to a better way of storing this text. Thanks in advance, Greg ***************************************************************** Web Address: www.airflow-body.com ***************************************************************** This e-mail and any files transmitted with it are intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error, please notify: postmaster@airflow-body.com This e-mail contains the views of the author and is not a reflection of "Airflow Streamlines BED" *****************************************************************
you can not put more than 256 characters in " ".
for e.g.
insert into table values("this quoted string can not exceed 256 characters");
an easy way to solve it is to put a place holder and supplie the values.
For eg. in ESQL/C it would be
insert into table values(:comments)
BTW why don't u declare two comments field each of varchar(255). Char(350)
is a big waste of space. LVARCHAR could have been fine if u are using 9.x
----- Original Message -----
From: "Greg Lloyd" <glloyd@airflow-body.com>
To: <ids@iiug.org>
Sent: Thursday, November 27, 2003 10:41
Subject: String Advice [2262]
> Hello,
>
> I am running IDS 7.31 TC4 on a Windows NT4 SP6 platform. In one particular
> table designed to hold engineer's comments, I defined a field of type
> VARCHAR(255,100). Very good until it was decided more comment space was
> necessary. I am at the limits for VARCHAR and felt, due to the variation of
> size of these comments (some are still less than 100 bytes), that type TEXT
> using a 4KB page for each field was a bit too wasteful. I changed the field
> in question to type CHAR(350) however when I try and update or insert
> records, I am receiving the error message 'A quoted string exceeds 256
> bytes'. I am not sure what is upset by the length of the string.
>
> Would someone please be so kind as to enlighten me and perhaps give me some
> advice as to a better way of storing this text.
>
> Thanks in advance,
>
> Greg
>
>
> *****************************************************************
> Web Address: www.airflow-body.com
> *****************************************************************
> This e-mail and any files transmitted with it are intended
> solely for the use of the individual or entity to whom they
> are addressed. If you have received this e-mail in error,
> please notify: postmaster@airflow-body.com
>
> This e-mail contains the views of the author and is not
> a reflection of "Airflow Streamlines BED"
> *****************************************************************
>
>
>