Re: Forms6: ORA 01839 on GET_ITEM_PROPERTY(Y2K)

From: <kaiserrj_at_my-deja.com>
Date: Thu, 18 Nov 1999 17:03:13 GMT
Message-ID: <811bge$fd$1_at_nnrp1.deja.com>


Hey Neville,

I was using GET_ITEM... in a pre-commit trigger to see if the user had changed a date. I declared a dt DATE variable, and then defined the variable like this:
dt := TO_DATE(GET_ITEM_PROPERTY('blk.item',DATABASE_VALUE)); This worked for every date tried (except for 2/29/0000).

Put another way...I get ORA-01839 when referencing a date variable, populated with GET_ITEM...database_value, and the database_value is Feb 29, 2000.

I tried lots of TO_DATE formatting but never got it to work. As a workaround,  I gave up on GET_ITEM..., created a hidden "copyitem" in the block, and copied the date item into the copyitem in a pre-query trigger, finally, I referenced the copyitem in the pre-commit.

Hope it helps. Rich

In article <80vhtk$5nh27_at_atbhp.corpmel.bhp.com.au>,   "Neville Sweet" <sweet.neville.nj_at_bhp.com.au.no_junk_email> wrote:
> Rich,
>
> Can you expand on this some more? How are you using database_value?
>
> I have used database_value with dates in Forms 4.5, and there are some
> difficulties, but I have found nothing to indicate that it is not Y2K
> compliant. I did some testing with Feb 29, 2000 on a Form that uses
> database_value, and I can't reproduce the problem.
>
> When working with Dates, I use the following code:
>
> Copy(Get_Item_Property('block.item', DATABASE_VALUE),
'block.item_save');
>
> where both items are defined as date or datetime.
> This works because get_item_property returns CHAR, and the char
version of
> the date is in NLS_DATE_FORMAT (or NLS_DATETIME_FORMAT).
>
> I know that Forms Items and Server PL/SQL are Y2K compliant, but
Forms 4.5
> uses an earlier version of PL/SQL which is not (eg. in the use of the
RR
> format specifier).
> Has this weakness been carried forward into Forms 5 and 6?
>
> Regards,
> Neville.
>
> kaiserrj_at_my-deja.com wrote in message <80p569$2as$1_at_nnrp1.deja.com>...
> >Hey all,
> >
> >If Feb 29, 2000 is in a table,
> >and you reference it form code:
> > GET_ITEM_PROPERTY(:block.item, DATABASE_VALUE)
> >You'll get an ORA-01839.
> >
> >I posted this for Forms5 in July, and have just
> >verified it also fails in ver 6, thought you'd
> >like to know...
> >
> >Rich
> >
> >
> >Sent via Deja.com http://www.deja.com/
> >Before you buy.
>
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu Nov 18 1999 - 18:03:13 CET

Original text of this message