Home » Developer & Programmer » Forms » post-query problem
post-query problem [message #262647] Tue, 28 August 2007 00:23 Go to next message
AMRS
Messages: 2
Registered: August 2007
Location: Qatar
Junior Member
can anybody help me please...

I have created a form for entry_info
with 3 blocks

1.block1 - master(vehicle_info) - canvas1(tabular)
2.block2 - detail(entry_exit_info) -canvas2(form)
3.block3 - sub detail ( entry_passenger_info) -canvas2(tabular)

here what i am doing is
1. perform the query in block1( which i am entering in a seperate form)
2. entering information in block2 and block3(tabular form) by clicking on a button from canvas1 (block1)
it's working fine.

The same steps i am repeating for exit_info except

block3 i am using
block4 - sub detail(exit_passenger_info)
Here what i want is it should not create the records in block2(since it is created already in enter_info with satus open),
it should only update the records with status close.

for doing this i wrote the following code in post_query of block2 as

select entry_driver_name,entry_driver_nation,entry_driver_id ....................
into :block2.exit_driver_name,:block2.exit_driver_nation,:block2.exit_driver_id........
from entry_exit_info
where srl_no=:block1.srl_no
and reg_no=:block1.reg_no
and status='O'

so that if i want to change the driver_name i can change it.

The problem is that instead of displaying the particular record it's displaying all records related to that srl_no.
so the user has to press next record to get the particular record.

how can i display only that record........,
i tried in many ways if i am using another option instead of post_query it's trying to insert the record.
please help me....
Re: post-query problem [message #262670 is a reply to message #262647] Tue, 28 August 2007 01:05 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Did you try to use SET_BLOCK_PROPERTY built-in with DEFAULT_WHERE property? As I've understood it, once you make changes, you want to fetch (i.e. EXECUTE_QUERY) only subset of available records. Perhaps this could do the job.
Re: post-query problem [message #262685 is a reply to message #262647] Tue, 28 August 2007 01:21 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Did you use the 'Relations' wizard to create the trigger and code that joins the master and detail blocks or have you written your own code?

David
Re: post-query problem [message #263635 is a reply to message #262685] Thu, 30 August 2007 09:51 Go to previous messageGo to next message
AMRS
Messages: 2
Registered: August 2007
Location: Qatar
Junior Member
sorry....i didn't understand what exactly you meant.

i have created all the blocks with data block wizard

1. block1.srl_no=block2.srl_no
2. block2.gate_pass_no=block3.gate_pass_no
3. block2.gate_pass_no=block4.gate_pass_no

while i am entering enter info i am creating record in block2
but i can only update the same record for exiting info.


how can i display one record in block2( there may be more than 10 records in block2 for srl_no=1 in block1). So when i perform the query i'll get all records in 3 blocks,but if i choose srl_no=1 in block1, and go to block2(canvas2) it should only retreive the record with status =open, but it's retriving all the records
how i can i display only one record in block2....(instead of all records in block2 related to that srl_no)


please help me ...it's urgent............




Re: post-query problem [message #263727 is a reply to message #263635] Thu, 30 August 2007 20:51 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Please review the master-detail example availabel from the Oracle Forms website.

Also look at the following:
Master-Detail entries
Simple
http://www.orafaq.com/forum/m/218834/67467/#msg_218834
Query
http://www.orafaq.com/forum/m/201562/67467/?srch=master+detail+david+query#msg_201562

David
Previous Topic: textitem problem
Next Topic: TIME/CLOCK IN FORMS 10g
Goto Forum:
  


Current Time: Sun Feb 02 19:15:39 CST 2025