Re: Forms 3.0 question

From: Rod Corderey <Lane_Associates_at_compuserve.com>
Date: Thu, 25 Jun 1998 16:47:22 +0100
Message-ID: <3592710A.4D306A7_at_compuserve.com>


Hi Michael,

without going into why you're doing it this way - or the question of compliance and forms 3 :-) -, you should be able to use select into from dual, then you can use the necessary SQL to_date and to_char functions.

Your main problem with COPY is the differing data types.

In your case field1 to field2 would equal

select to_char(:block.field1,'dd-mon-yy') into :block.field2
from dual;

and a to_date for vice versa remembering to expand the year format.

hope its helpful

Rod Corderey

Lane Associates
Lane_Associates_at_Compuserve.com
http://www.Lane-Associates.com

Michael wrote:
>
> I am currently working on an old application developed with forms 2.0
> !!!
> After converting them to Forms 3.0 I need to build in a workaroud to
> make these forms year 2000 compliant.
>
> Imagine a block with a field1 and a field2 .Field1 is a DATETIME field
> and a basetable item which is took of the screen. Field2 is a CHAR field
> no, basetable item and is displayed on the location where Field1 used to
> be displayed. After executing a query, Field 2 should be populated whith
> the value of field1 using format dd-mon-yy.
> A post query trigger is being used for that. If that trigger does not
> exist yet it is easy. I make a Version 3 trigger and use the code:
> :block.field2 := to_char(:block.field1,'dd-mon-yy');
>
> If there is already a version 2 trigger this will not work. I need to
> know what is the correct code to copy the value of database field1 to
> display item field2.
> I tried the following (among others)
> #exemacro copy block.field1 into block.field2
> This does not work because the length of the date in field1 is 11
> characters. Usin a format does not work either.
> What am I doing wrong.
> Replacing the V2 triggers with V3 triggers is not an option since there
> are so many of them and time is limited.
>
> Thanks to anyone who can help me out.
>
> Michael
> The Netherlands.
Received on Thu Jun 25 1998 - 17:47:22 CEST

Original text of this message