Subject Re: [ib-support] Funny problem
Author Martijn Tonies
Hi Paul,

> > >I have a domain:
> > >
> > >CREATE DOMAIN "D_BICHAR_31" AS VARCHAR(31)
> > >CHARACTER SET WIN1252 COLLATE PXW_INTL850;
> > >
> > >And a field:
> > >
> > >DNAME D_BICHAR_31
> > >
> > >Yet I can't put 30 characters worth of data in this field, any idea
> > >as to why?
> >
> > No. But the error message might help, and the number of
> > characters you CAN put into the field, and the field size
> > and character length from rdb$fields. You should be able
> > to store 31 characters in a varchar 31, regardless of character
> > set. The collation affects the width of an index, but not
> > the storage size.
> >
>
> It seems to accept 20 characters but not 21 the error message is this:

What characters are you putting in? ABCDEF...? Or special
characters?

> SQL Message : -802
> Arithmetic overflow or division by zero has occurred..
>
> Engine Message :
> arithmetic exception, numeric overflow, or string truncation
>
> >From RDB$FIELDS
>
> RDB$FIELD_LENGTH = 31
> RDB$CHARACTER_LENGTH=31

A non-unicode charset, right?

> It was string truncation that clued me into the problem. I am going to
make the
> domain larger, and see if that helps. I don't really care if it needs to
be 41 or 51
> even, just I have other similar fields and would need to boost those as
well.

Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.interbaseworkbench.com

Upscene Productions
http://www.upscene.com

"This is an object-oriented system.
If we change anything, the users object."