I have trouble understanding the following:

Are you saying that when the application posts the "insert statement" into 
firebird's dll the size of the string contained in the insert statment is 
measured by firebird's engine and that size is what is being compared against 
the size of the field on the table? If that is the case then I am cooked/fried.

The application is written in visual basic 6 and the insert in executed 
multiple times without any issues until the contents of the text inserted is 
larger than the field definition in Firebird, so what I am trying to do is to 
"catch" the string before saved on the DB and trim it to (field size - 1).

Do you think it could be any way to sort out the issue without modifying and 
recompiling firebird engine?

Regards,
Fabian





--- In [email protected], Ann Harrison  wrote:
>
> On Wed, Jan 16, 2013 at 6:08 AM, fabianchocron  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,
> 
> Ann
> 
> 
> [Non-text portions of this message have been removed]
>


Reply via email to