Re: Form Builder puzzle
Date: Mon, 7 Feb 2000 15:59:32 -0500
Message-ID: <87nbnd$pgn$1_at_bob.news.rcn.net>
[Quoted] Hi All,
I find a nice solution for this:
1. In the Property Palette of the phone# col I verify that: a. the datatype was set up to char b. the input mask was "("999")999"-"9999 (no spaces in between here) c. Wrote a datablock procedure that I called get_phone as follows: begin if(:tablename.phone_number is null or :tablename.phone = 0000000000)then
[Quoted] message ('Please enter a correct phone number.) raise form_trigger_failure;
end if;
end;
d. Create a phone_number item trigger as follows: get_phone;
2. Try to enter wrong data...
Thanks,
John N
Brian W. Chester <bwchester_at_home.com> wrote in message
news:2dBn4.3550$a27.117865_at_news1.rdc1.mb.home.com...
> John,
>
> A check constraint at the database level will cause increased traffic as
the
> database must inform the application that the insert or update operation
has
> failed. As well you will have to code in exceptions to handle it to tell
> the user why the operation has failed.
>
> A number mask is probably getting close to the solution but as I have
found
> out from experience only forces the user to use more zeros!. Of course,
> there is no way I am aware of, to ensure that the telephone number is
valid
> but the things I check for are:
> - Are all the digits the same? If so reject it,
> - Are the first three or the last four digits identical? If so, ask the
> user for verification!
>
> HTH.
>
> Brian
>
>
> "John N" <jn14624_at_yahoo.com> wrote in message
> news:87mmb5$b9l$1_at_bob.news.rcn.net...
> > Have a telephone # col in my form that was being skipped or 0's entered
> into
> > by users. I want to avoid that.
> > My solution can be (is this the best way?):
> > 1. Set up a check constraint on the col
> > 2. Set up a number mask on the Property for the col
> >
> > Anyone?
> > Thanks,
> > John N
> >
> >
>
>
Received on Mon Feb 07 2000 - 21:59:32 CET