Subject Re: [ib-support] Strange things happen to SP Parameter
Author Martijn Tonies
Hi,


> Thanks!
> How did you fix the problem?

As Helen says, it's a meta-data fetch problem. For character (char/varchar)
columns,
you need to use a column in the system tables called CHARACTER_LENGTH
instead
of LENGTH. The length columns has the _byte_ length, for example: 4 for an
integer.

For single-byte charactersets, this works ok - for others (like
UNICODE_FSS),
it's wrong.

By re-loading the meta-data after an "unicode save", Firebird Workbench that
thinks
the column is (3 bytes/char) 3 * yourlength -> after another save of the
metadata,
this process repeats ... Etc...

I'm now using the correct column for char/varchar parameters, and therefore
sending
the right ALTER PROCEDURE statement to Firebird.


With regards,

Martijn Tonies
InterBase Workbench - the developer tool for InterBase & Firebird
Firebird Workbench - the developer tool for Firebird
Upscene Productions
http://www.upscene.com

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

>
> Hi Andreas,
>
> > I use the latest stable Firebird release with Delphi 5 Pro. and the
> FIBPlus
> > Components. In my Database there are several Stored Procedures. Some of
> them
> > have about 20 Parameter of different types like INTEGER or VARCHAR. Most
> of
> > the VARCHAR-Parameter have a length of about 100 to 255 charachters and
I
> > use UNICODE_FSS characterset.
> >
> > Now to my problem:
> > After I´ve changed a SP or did something else in the DB with
> > Firebird-Workbench or EMS Firebird Manager the length of my VARCHAR and
> CHAR
> > Parameters is changing itself!!! E.g NAME VARCHAR(200) gets to NAME
> > VARCHAR(765) after I commit the changes to the SP. This stops only when
> > Firebird says: '...implementation limit exceded...' and my Parameter
have
> a
> > length of about 3000 charachters!!!!!.
> >
> > What´s going on? Is this a bug or a wrong DB Design on my side? Are the
SP
> > Parameter limited?
>
> I can confirm this error in the Workbench tool - and I can fix it. It's
NOT
> an error
> of Firebird, but of the client tools.