Re: Forms 3: query with non-numeric in number fields
Date: 20 Jul 1994 11:13:37 +0100
Message-ID: <30itch$c5b_at_cs3.brookes.ac.uk>
Ian Dixon (idixon_at_syntaxis.ukmail.net) wrote:
> > The problem occurs with the one number field. When it is included
> > in the test, I get the value_error exception and an FRM-50016
> > message.
> If a value such as '13%' is entered then I get the error. Without
> the test in the pre-query, forms will happily take this and do the
> query.
We've just fixed this one. Bodge mode ON!
As you may have figured out, the error you are getting is because of the % character in the field. For some reason, when testing the NULLity (is there such a word?) of a field, Forms insists on actually converting it to the appropriate datatype. This gives you the good old 'Legal characters are 0-9 + - E' message. There is no sensible way around this, since virtually every operation on that field is going to try and do the conversion.
The fix we've got (hot of the the Oracle help desk) is to use name_in to
extract the field contents. So what you want is:
if name_in('fieldname') is null then
...
instead of
if :fieldname is null
Personally, I hate this.
-- Tommy Wareing We lost on a technicality Oxford Brookes University We were wrong. 0865-483389Received on Wed Jul 20 1994 - 12:13:37 CEST