Home » Developer & Programmer » Forms » Execute query
Execute query [message #82947] Mon, 21 July 2003 00:08 Go to next message
Anju
Messages: 33
Registered: September 2000
Member
Hi Friends,
I need a help.
I am trying to execute a query based on my criteria.
Like in new-form-instance trigger I have written:

select start_time into p_stime from time_sheet
where END_TIME is null
and employee_id = (select employee_id from employee_detail
where user_id = user);

:time_sheet.start_time := p_stime;
--(time_sheet is a database block and start_time is database clolumn)
execute_query;

Basically I want to execute my query based on p_stime but it isn’t doing. It simply pulls up p_stime in start_time column and doesn’t populate the other columns and says FRM; 40202 fields must be entered. I have also tried by assigning a where close in database block but no luck. Where am I doing wrong? How can I make it work?

Thanks in advance,
Anju
Re: Execute query [message #82948 is a reply to message #82947] Mon, 21 July 2003 01:25 Go to previous messageGo to next message
Venki
Messages: 2
Registered: December 2001
Junior Member
Specify the condition in 'WHERE clause' of the Block Property. Give 'Execute Query' in 'When-new-form-instance'
Re: Execute query [message #82950 is a reply to message #82947] Mon, 21 July 2003 05:23 Go to previous messageGo to next message
Thomas
Messages: 67
Registered: September 1999
Member
Hi anju,
FRM: 40202 this error comes when ur item property (Requried is Yes). make all the column property to 'No'.Before execute_query make a clear_form(No_Commit) but in ur mind put ur value in a global or parameter variable. after that use the set block property with default_where.
Thomas.
Re: Execute query [message #82952 is a reply to message #82948] Tue, 22 July 2003 00:48 Go to previous messageGo to next message
Sun
Messages: 92
Registered: August 2002
Member
In prequery u can make use of set_block_properyty
default_where clause and try..
Re: Execute query [message #82958 is a reply to message #82947] Tue, 22 July 2003 03:35 Go to previous message
Bhag Singh
Messages: 36
Registered: May 2002
Member
:time_sheet.start_time := p_stime;
in above statement u r assigning the value to :time_sheet.start_time by using ":=" operator

use the following statement
":time_sheet.start_time = p_stime"
and use it in where cluase property of block

i think it will work .
thanks
vicky
Previous Topic: Property/code to set focus in overwrite not insert
Next Topic: Tabs In Oracle Forms 6i
Goto Forum:
  


Current Time: Mon Jul 01 09:15:57 CDT 2024