Home » Developer & Programmer » Forms » DATE and Time disappear when Enter query
DATE and Time disappear when Enter query [message #243889] Sun, 10 June 2007 17:29 Go to next message
alvintiow
Messages: 5
Registered: June 2007
Junior Member
Hi, I got a data Block BANK_STAFF and a text TODAYS_DATE.

I would like to display the DATE permanently (my data type is DATE and initial value is $$DATE$$), I tried many times, but when I enter new query, the date just disappear.

Method 1.
I created when-new-form-instance trigger and tried the following query:

begin

:BANK_STAFF.TODAYS_DATE := to_char(sysdate, 'DD-MON-YY');

end; -->This does not working permanently on my form.

Method 2.
I created a when-timer-expired trigger on form level. and entered

:TODAYS_DATE := to_char(sysdate,'mm/dd/yyyy HH:MI:SS');

in my TODAYS_DATE I used when-new-form-instance trigger and entered the following query:

DECLARE
my_timer_id TIMER;
BEGIN
my_timer_id := CREATE_TIMER('my_TIMER', 1000, REPEAT);

IF ID_NULL(my_timer_id) THEN
MESSAGE('Timer Not Created');
RAISE FORM_TRIGGER_FAILURE;
END IF;
END;

Both of the solution not work fine for me, can anyone help me to solve this?

Thanks.

Regards,
Alvin
Re: DATE and Time disappear when Enter query [message #243893 is a reply to message #243889] Sun, 10 June 2007 21:07 Go to previous messageGo to next message
jamalfarooq
Messages: 35
Registered: August 2006
Member
hi,

Hope this will work.
if date is not database field then create control(non-database) block and place this field (date) their. Cool

Hope this will work.. if not let me know.

Thanks.
Jamal
Re: DATE and Time disappear when Enter query [message #244135 is a reply to message #243893] Mon, 11 June 2007 12:42 Go to previous messageGo to next message
alvintiow
Messages: 5
Registered: June 2007
Junior Member
jamalfarooq wrote on Sun, 10 June 2007 21:07
hi,

Hope this will work.
if date is not database field then create control(non-database) block and place this field (date) their. Cool

Hope this will work.. if not let me know.

Thanks.
Jamal


Hi,

I created an not database block and paste the following query:

begin

:BANK_STAFF.TODAYS_DATE := to_char(sysdate, 'DD-MON-YY');
go_block('BANK_STAFF');
execute_query;

end;

I cannot Query/Enter as it raise frm-40202 field must be entered,
Could you help me to look at my file please. Thanks in advance Razz

Alvin

Re: DATE and Time disappear when Enter query [message #244139 is a reply to message #244135] Mon, 11 June 2007 13:13 Go to previous messageGo to next message
alvintiow
Messages: 5
Registered: June 2007
Junior Member
Hi,

When I Query/Enter in my LOG_IN.fmb I encounter
frm-41300:This function cannot be performed here

and even my USERNAME and PASSWORD are correct, it still display the message which the USERNAME and PASSWORD are incorrect.

Declare
user_name char(15);
password number(9);
alert number;

begin
select USERNAME
into user_name
from LOG_IN
where user_name = :LOG_IN.USERNAME
and password = :LOG_IN.PASSWORD;

if user_name = :LOG_IN.USERNAME
and password = :LOG_IN.PASSWORD then
alert := show_alert('connect_successful');
message('Username and password are correct - go to
main_menu');

call_form('/home/ca5cwu/ACCOUNT_INFORMATION_TYPE');
end if;
exception
when no_data_found then
alert := show_alert('failed');
message('Username and/or password are incorrect');
raise form_trigger_failure;
end;

Can you help me to look at this problem as well?Thanks.

Alvin
  • Attachment: LOG_IN.fmb
    (Size: 52.00KB, Downloaded 1020 times)
Re: DATE and Time disappear when Enter query [message #244366 is a reply to message #243889] Tue, 12 June 2007 08:24 Go to previous messageGo to next message
alvintiow
Messages: 5
Registered: June 2007
Junior Member
.......
Re: DATE and Time disappear when Enter query [message #245024 is a reply to message #244366] Fri, 15 June 2007 00:39 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
What do you mean by "display the DATE permanently"? Do you want the date displayed on a header line even when you go into 'enter-query' mode?

David
Re: DATE and Time disappear when Enter query [message #245159 is a reply to message #245024] Fri, 15 June 2007 06:06 Go to previous messageGo to next message
alvintiow
Messages: 5
Registered: June 2007
Junior Member
yes,but I have solved it, thanks.lol
Re: DATE and Time disappear when Enter query [message #245162 is a reply to message #243889] Fri, 15 June 2007 06:14 Go to previous message
zafarkarachi
Messages: 29
Registered: November 2006
Location: Karachi Pakistan
Junior Member
Always share you solution with all others.
May be you get some other good examples

Thanks

Zafar
Previous Topic: Menu should be in the full path
Next Topic: FRM-40735 : WHEN-BUTTON-PRESSED TRIGGER RAISED UNHANDLED EXPCEPTION ORA-00001.
Goto Forum:
  


Current Time: Sat Feb 08 23:52:16 CST 2025