Subject Re: [firebird-support] Issues with String Truncation error on insert (FB 2.1 64 bits windows server)
Author Ann Harrison
On Wed, Jan 16, 2013 at 6:08 AM, fabianchocron <fabianch@...> wrote:

> We are trying to resolve an issue caused by the Application inserting a
> string larger than the database field size. The planned solution was to add
> a trigger before insert as follows:
> new.string = substring(new.string from 1 for 100);

Unfortunately, the check for the length of new.string happens when the
value is inserted into the record buffer, not when it's stored in the
database, so your trigger isn't going to work. The buffer is based on the
table definition. Have you considered increasing the size of the field?

Good luck,


[Non-text portions of this message have been removed]