Subject | IBO sees different VarText size than IBConsole? |
---|---|
Author | Lukas Zeller |
Post date | 2001-06-06T08:29:40Z |
Hello,
yesterday, I spent quite some to track down a bug which had to do with
VarChar field sizes.
I have a field in a table that was created as VARCHAR(20).
When I dump the metadata with IBConsole, I still see VARCHAR(20).
However, when looking at the table with IB_WISQL, it shows
VarText(22) there.
So, IBO controls allow up to 22 chars to be input in this column.
In consequence, a stored procedure that tried to fetch this
column INTO a VARCHAR(20) caused a "string truncation" exception.
Why and what is this difference between IBConsole metadata and
IBO's view? This happened only to one VARCHAR(20) field; I
have several others that result as expected in a VarText(20)
in IBO. I can reproduce the scenario by building the database
anew from SQL scripts, but as this is a quite complicated
sequence I haven't tried to extract the single table yet
(but I will if it helps to solve the mistery...)
Thanks for any answer in advance!
--
Lukas Zeller (luz@...)
-
Synthesis AG, Sustainable Software Concepts
info@..., http://www.synthesis.ch
yesterday, I spent quite some to track down a bug which had to do with
VarChar field sizes.
I have a field in a table that was created as VARCHAR(20).
When I dump the metadata with IBConsole, I still see VARCHAR(20).
However, when looking at the table with IB_WISQL, it shows
VarText(22) there.
So, IBO controls allow up to 22 chars to be input in this column.
In consequence, a stored procedure that tried to fetch this
column INTO a VARCHAR(20) caused a "string truncation" exception.
Why and what is this difference between IBConsole metadata and
IBO's view? This happened only to one VARCHAR(20) field; I
have several others that result as expected in a VarText(20)
in IBO. I can reproduce the scenario by building the database
anew from SQL scripts, but as this is a quite complicated
sequence I haven't tried to extract the single table yet
(but I will if it helps to solve the mistery...)
Thanks for any answer in advance!
--
Lukas Zeller (luz@...)
-
Synthesis AG, Sustainable Software Concepts
info@..., http://www.synthesis.ch