Subject Validation error for unknown column
Author Aldo Caruso
Hi,

I created a table with a numeric non null field. Afterwards I
realized that it could be a calculated field, so I dropped the field and
recreated it accordingly.

Before:

NETO CURRENCY NOT NULL,
IVA CURRENCY NOT NULL,
TOTAL CURRENCY NOT NULL

After:

NETO CURRENCY NOT NULL,
IVA CURRENCY NOT NULL,
TOTAL COMPUTED BY (NETO + IVA)

( Being CURRENCY a domain NUMERIC(18,2) )

Then I tried to insert a record in the table using a stored procedure,
but the insertion failed giving the following strange message :

"validation error for column *** unknown ***, value "*** null ***"

Then I tried to insert the record directly in the table, using no stored
procedure, but I got the same result.

I guess that the "unknown" column has to do with the dropped and
recreated TOTAL field, and something remainend in memory related to its
non null constraint.

I dropped and recreated the stored procedure, and then error
dissapeared. I can insert records with no problem now.
For security, I restarted Firebird and checked the database using gfix
validate. No errors were shown.

Does anyone have any idea of what produced such a strange error ?

Thanks in advance,

Aldo Caruso