Re: Q: forms 10G date format

From: Sybrand Bakker <gooiditweg_at_nospam.demon.nl>
Date: Wed, 08 Mar 2006 06:14:11 +0100
Message-ID: <fqps02505hmsbuac0n7lcf9dfqbphrddjd_at_4ax.com>


On 7 Mar 2006 20:09:21 -0800, yf110_at_vtn1.victoria.tc.ca (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

1 default date format of the database is irrelevant as the client has a default date format
2 Unless you can control that yourself, DON'T rely on a default date format.
3 alter session in pl/sql only works using execute immediate 4 the environment variable should work OK.

--
Sybrand Bakker, Senior Oracle DBA
Received on Wed Mar 08 2006 - 06:14:11 CET

Original text of this message