From: KRM <malleykr@my-deja.com>
Subject: Re: Newbie question re Forms 6.0
Date: 2000/03/03
Message-ID: <89p0jn$r9t$1@nnrp1.deja.com>#1/1
References: <38BFD910.3B70E658@bangor.ac.uk>
X-Http-Proxy: 1.1 bess-proxy1.csc.com:80 (N2H2 Proxy Server/4.19), 1.0 x22.deja.com:80 (Squid/1.1.22) for client 20.19.7.193, 192.251.173.34
Organization: Deja.com - Before you buy.
X-Article-Creation-Date: Fri Mar 03 18:34:31 2000 GMT
X-MyDeja-Info: XMYDJUIDmalleykr
Newsgroups: comp.databases.oracle.misc
X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)


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@bangor.ac.uk>,
  Kevin Hughes <j.k.hughes@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@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.


