Home » Developer & Programmer » Forms » Searching through block (Forms)
Searching through block [message #614260] Tue, 20 May 2014 03:07 Go to next message
oradev10
Messages: 7
Registered: October 2013
Junior Member
I need to check each row as the user enters that it is not a duplicate. I plan on checking after when-validate-record or when-validate-item. It will not let me move to a new row using first_record and next-record because this navigation is not allowed. I don't want to write a cursor against the DB because not all the rows have been stored yet. How can I cycle through the block and compare each row to the current row? Thanks in advance.
Re: Searching through block [message #614261 is a reply to message #614260] Tue, 20 May 2014 03:18 Go to previous messageGo to next message
cookiemonster
Messages: 13921
Registered: September 2008
Location: Rainy Manchester
Senior Member
Use the post command to write each record to the DB as it is entered. Then use a cursor, or select statement in when-validate-record.
Post writes the data to the DB but does not commit it, so if the user doesn't want to save the changes those modifications can be rolled back.
Re: Searching through block [message #614266 is a reply to message #614261] Tue, 20 May 2014 04:07 Go to previous messageGo to next message
oradev10
Messages: 7
Registered: October 2013
Junior Member
Can you please suggest a trigger to put the post command in. I have tried a few and keep getting errors that it is not allowed.
Re: Searching through block [message #614270 is a reply to message #614266] Tue, 20 May 2014 04:16 Go to previous messageGo to next message
cookiemonster
Messages: 13921
Registered: September 2008
Location: Rainy Manchester
Senior Member
when-new-record-instance.
Re: Searching through block [message #614271 is a reply to message #614270] Tue, 20 May 2014 04:17 Go to previous message
cookiemonster
Messages: 13921
Registered: September 2008
Location: Rainy Manchester
Senior Member
You may want to wrap it in an IF statement that checks the block_status.
Previous Topic: I want to update my second block Using first (Base) block in oracle Forms 10 g
Next Topic: Oracle Error 00904
Goto Forum:
  


Current Time: Thu May 02 06:41:13 CDT 2024