Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Clearing page cache after delete to avoid ora-1403 errors in Apex 5.01

MasongOct 3 2015 — edited Oct 4 2015

Hi All,

Still "New" to Apex!

I am getting ORA-01403: no data found   errors after deleting a row in a form in Apex 5.01 that was created from the interactive Report + Form template.

After searching the forum, I found direct reference to this situation:

ORA-01403: no data found On Deletion of a record

--------------------------------------------------------------------------------

After deleting a record, you should clear the cache of the page. If you don't the session state of the primary key item may keep the old value of the deleted record. The page on load process will try to fetch that value from the table and run into no data found.

---------------------------------------------------------------------------------

Unfortunately, I don't know where or how to "clear the cache of the page" after deleting a record.

I have seen reverence to APEX_UTIL.CLEAR_PAGE_CACHE but I'm not sure where to use it.

Still others say to set the value of the key column to NULL.

The Apex documentation says to use the URL:

2.9.3.2.2 Example: Clearing Cache on a Page and Passing an Item Value

This example shows how to implement an update form. It clears existing information and sets the item's value (typically a primary key).

f?p=6000:6003:&APP_SESSION.::NO:6003:MY_ITEM:1234 

This example:

  • Runs page 6003 of application 6000 and uses the current session ID

  • Indicates to not show debug information (NO)

  • Clears all values maintained by the current session's cache for items on page 6003

  • Sets the session state of an item called MY_ITEM to the value 1234

But I'm not sure where or how to go about doing that in the context of the delete button.

Can anyone point me in the right direction? I'm trying to learn Apex using as much built-in native functionality as possible.

If clearing the page cache is what needs to be done after deleting a row, wouldn't that functionality have been built into the Delete button?

Thanks,

Mason

This post has been answered by Masong on Oct 4 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 1 2015
Added on Oct 3 2015
3 comments
1,144 views