Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Newbie question re Forms 6.0

Re: Newbie question re Forms 6.0

From: KRM <malleykr_at_my-deja.com>
Date: 2000/03/03
Message-ID: <89p0jn$r9t$1@nnrp1.deja.com>#1/1

Have you tried using sysdate? In your trigger, you could have something like:

select sysdate
  into :block_name.datetime
  from dual;

Have a field called datetime in the block that is being inserted. Set this field's database table to null. You can also set the field's canvas to null if you don't want it to be visible to the user.

If you need to just have the time, and not the date and time, you could use something like:

l_s_time := to_char(l_d_time,'HH24:MI:SS'); l_d_just_time := to_date(l_s_time,'HH24:MI:SS');

Good luck!
Kristen

In article <38BFD910.3B70E658_at_bangor.ac.uk>,   Kevin Hughes <j.k.hughes_at_bangor.ac.uk> wrote:
> Hi,
> First of all my apologies if this is not the correct group to
 post this
> question but only this group and comp.database.oracle are in my
 newsfeed.
>
> This is my problem. I am attempting to insert a record into a table.
 On
> insert i need to generate a timestamp (created_on)and a sequential
 number
> (application_no) which are also inserted into the same table. Both
 these
> attributes are designated as 'not null' in the table.
> The only way in which i've got it to work is to create non navigable
 text
> items for the two auto generated fields, populate them
> on-new-form-instance, fill in the other text items, then insert the
 record
> into the table. This isn't what I want though because the timestamp
 is when
> i opened the form and if someone decides not to insert a record then
 my
> sequence will have gaps.
> Ideally, I need to create the sequence and timestamp on commit and
 also not
> have them on the form.
>
> Can anyone suggest a way in which I can do this?
>
> Thanks in advance for any help.
> --
> J. Kevin Hughes j.k.hughes_at_bangor.ac.uk
> Administrative Computing
> University of Wales - Bangor
> Adeilad Deiniol
> Ffordd Deiniol / Deiniol Road
> Bangor LL57 2UX
> Tel: (01248) 382373 Fax: (01248) 383826
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Fri Mar 03 2000 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US