Re: Forms 3, Y2K, DD-MON-YY in query mode.
Date: 1998/04/07
Message-ID: <352A509C.491D_at_cam.ac.uk>#1/1
Biff Steel wrote:
>
> Help, non-forms programmer needs help deparately.
>
> I went through and inserted the ON-VALIDATE-FIELD trigger to convert
> entered dates to the DD-MON-RR Y2K compliant field (as per Oracle's
> Y2K document) and all works well for new records and updating existing
> records but I am unable to query dates properly. E.G. a date stored as
> actual date 1-jan-2001 cannot be queried. Querying for 1-jan-1 only
> retrieves records with actual date of 1-jan-1901.
>
> I probably need to insert conversion code in a different trigger since
> I know for fact that my ON-VALIDATE-FIELD is not firing when in query
> mode.
>
> No, I don't have a manual. No I am not a forms programmer. Yes, I am
> pathetic. No, I am not enjoying myself.
>
> Thanks for any help that can be rendered..
You need code in the PRE-QUERY trigger for the block. It needs to say something like
IF :myblock.Mydate IS NOT NULL THEN
:myblock.mydate := '#=to_date(''' || :myblock.mydate ||
''',''DD-MON-RR'')'
END IF;
You may have to increase the query length of the field.
>
> nospam e-mail jmoran_at_baraboo.com
Received on Tue Apr 07 1998 - 00:00:00 CEST