Subject Re: [firebird-support] URGENT - CONCATENATION ERROR - BUG
Author Svein Erling Tysvaer
Hi Christoph!

Please tell us a lot more:
Which Firebird version?
How are the fields defined (including which character set)?
How do you do your concatenation (sql please) and with what tool? Do you
get the same error when using isql?

I created a new table in Firebird 1.5 on Windows XP myself:

CREATE TABLE TESTCONCATENATION
(
ID INTEGER NOT NULL,
FIELD1 VARCHAR( 2056) CHARACTER SET ISO8859_1 COLLATE
NO_NO,
FIELD2 VARCHAR( 10) CHARACTER SET ISO8859_1 DEFAULT
'1234567890' COLLATE NO_NO,
CONSTRAINT PK_TESTCONCATENATION PRIMARY KEY (ID)
);

(well, I used DB Workbench to create the table, and when looking at the
DDL it produces, it doesn't include the character set I specified, so I
inserted that bit manually in this email)

inserted two rows into the table (one of them had more than 300
characters in Field1), and then ran 'select field1 || field2
from TESTCONCATENATION' in DB Workbench. I had no problems whatsoever
with getting a result string of more than 300 characters.

So there are differences between how the two of us do things. To make us
able to fully understand your problem (and be able to give decent
help), please describe your problem in a way so that it is impossible
for us to do exactly what you describe without getting problems.

Set

crizoo4712 wrote:
> The concatenatin problem is obviously a bug.
> i have a field varchar(2056).
> i have anaother field varchar(10) default '1234567890'.
> i concatenate it to the first field.
> i also control the length of the concatenation-result.
> as soon as i come beyond the length of 255 (!) i get the error 'string
> truncation'.
> this is ovbiously a bug.
> what could be a workaround?
> regards, christoph