Incorrect error message
Posted: Thu 04 Jul 2013 16:58
Hi
I had a weird situation which waste a lot of hours only because the exception error was incorrect !!
I have a table (TIBCQuery component) that one of its fields defined as not null foreign key to another table ID1. and after insert I set the ID1 value of the first table to the ID1 value of the foreign key table.
The result is exception error message "field ID1 must have a value". I did trace to the code and found a previous exception message appear even before this one (appear only at debugging): "Field ID1 does not exist" !! I checked the table select SQL many times and found it correct! I even rewrite the table whole SQL that link with other foreign key tables but I always find the SQL is correct and the field ID1 exists !!
Finally I notice I did not set a flag responsible for making this table open in a config file that because I use the same table between 3 different applications.
However my point if I get an exception error message like "table is not open" I could solve the problem in a minute instead of wast precious hours so I hope this can be enhanced.
I had a weird situation which waste a lot of hours only because the exception error was incorrect !!
I have a table (TIBCQuery component) that one of its fields defined as not null foreign key to another table ID1. and after insert I set the ID1 value of the first table to the ID1 value of the foreign key table.
The result is exception error message "field ID1 must have a value". I did trace to the code and found a previous exception message appear even before this one (appear only at debugging): "Field ID1 does not exist" !! I checked the table select SQL many times and found it correct! I even rewrite the table whole SQL that link with other foreign key tables but I always find the SQL is correct and the field ID1 exists !!
Finally I notice I did not set a flag responsible for making this table open in a config file that because I use the same table between 3 different applications.
However my point if I get an exception error message like "table is not open" I could solve the problem in a minute instead of wast precious hours so I hope this can be enhanced.