Re: Q: forms 10G date format

From: Martin Doherty <martin.doherty_at_undisclosed.com>
Date: Wed, 08 Mar 2006 15:02:03 -0500
Message-ID: <o0HPf.30$M%2.110_at_news.oracle.com>


Malcolm Dew-Jones wrote:

>Hello
>
>I am trying to find how to set the default data format that the _database_
>will use when it receives a query to run from within a 10G forms
>application.
>
>I wish to allow the user to enter a date in query mode. I would like them
>to be able to use the same format that the forms application uses
>everywhere else when it display dates. For single dates there is no
>problem, it all works like magic, but if you use #BETWEEN then you need to
>quote the dates and either use to_date or the correct _database_ default
>date format (i.e. it's not any of the formats set within the form itself
>as far as I can tell).
>
>Asking the user to use #BETWEEN and to quote the dates sounds OK to me,
>but I don't fancy telling them they have to use to_date or some other (to
>them non-standard) date format.
>
>The forms builder help file has a blurb about "alter session" but in fact
>the forms pl/sql compiler rejects the command. The NLS data environment
>variable didn't seem to make any difference ("but I didn't reboot, better
>try that" he says to himself). I suppose I could parse the field myself
>if I define the right trigger (which one I wonder) but that sounds like a
>lot of bother for what should be a trivial problem.
>
>Anyway, if someone knows how to force the 10G form's database session
>to use a particular default date format then I would certainly appreciate
>hearing it.
>
>Thanks
>
>
The Forms Enter-Query mode is convenient for developers and extremely savvy end users with a little SQL knowledge (enough to be dangerous!), but is really pretty horrible from the standpoint of good user interface design. This is why, in Oracle Applications, just about every form has a 'Find' function (from the toolbar or menu or fn-key) which opens a separate Find window with the appropriate fields for searching. It's the designer's choice as to what the search options are, you could provide 'From' and 'To' date fields (where a blank 'From' means all dates up until the 'To' date, and vice versa), dropdown lists, text fields that allow wildcards etc.

This Find window uses a swag of additional Forms objects: window, canvas, block, items, buttons ... so it's a pile of extra programming and testing effort, but the end result is a far superior end-user experience. How to do this is fully explained in the Oracle Applications Developer's Guide, which I guess could be available via OTN. Received on Wed Mar 08 2006 - 21:02:03 CET

Original text of this message