Subject RE: [IBO] IBO sees different VarText size than IBConsole?
Author Claudio Valderrama C.
> -----Original Message-----
> From: Lukas Zeller [mailto:luz_info@...]
> Sent: Jueves 7 de Junio de 2001 3:05
>
> Yes, that's it. I checked the process of generating that field in
> question,
> and indeed, it was created as varchar(10) and then ALTERed to varchar(20)
> later.
>
>
> At 1:16 -0400 7.6.2001, you, Claudio Valderrama C. wrote:
> >Do:
> >
> >1)
> >select f.rdb$field_length, f.rdb$character_length
> >from rdb$fields f join rdb$relation_fields rf
> >on f.rdb$field_name = rf.rdb$field_source
> >and rf.rdb$relation_name = <TABLE>
> >and rf.rdb$field_name = <FIELD>;

> rdb$field_length = 22
> rdb$character_length = 20

No doubt, metadata has information has been pissed, to say the least. The
engine itself will have trouble reporting the logical length of the field. I
suggest that you create a new field, copy the information and drop the old
buggy field.


> >2)
> >select max(f.rdb$format)
> >from rdb$formats f join rdb$relations r
> >on f.rdb$relation_id = r.rdb$relation_id
> >and r.rdb$relation_name = <TABLE>;
> MAX = 4

4 changes to metadata have been tracked. This is the 5th version of the
table if I remember well that format starts at zero.


> Obviously, IBO uses rdb$field_length for limiting the number
> of characters that can be input into a field, not rdb$character_length.

It's not as easy as you think. IBO gets that information when preparing the
statement, not by reading raw tables (metadata is read and cached for other
purposes, ok). Hence, it seems to me that the engine itself is confused.

C.