Home » Developer & Programmer » Forms » Entering Error Log Into a Table (Oracle Forms 10g, Windows XP)
Entering Error Log Into a Table [message #655107] Mon, 22 August 2016 06:55 Go to next message
Sandeepsm
Messages: 7
Registered: July 2016
Location: Greeny Kerala
Junior Member
Hi All,
I would like to know is there a way to log error captured in the exception part in a pl/sql block into a table without committing the transactions before the error. That is, I execute a pl/sql block , then an error occurred i would catch it using exception block and i need to save that error into a error log table, also the statement that executed till that moment needs to be rolled back.




Thanks&Regards
Sandy

--Every Accomplishment Starts With The Decision To TRY.
Re: Entering Error Log Into a Table [message #655108 is a reply to message #655107] Mon, 22 August 2016 07:35 Go to previous messageGo to next message
Littlefoot
Messages: 21612
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
One option is to create a (stored) procedure which utilizes PRAGMA AUTONOMOUS_TRANSACTION. You'd pass - as its parameters - error code (and whichever information you want) to the procedure. Procedure would insert those information into a log table and COMMIT. As it is an autonomous transaction, this commit wouldn't affect anything you did in a form (or elsewhere).

Here's an example: Autonomous Transactions. There are many other results returned by your favorite Internet search engine so - have a look.
Re: Entering Error Log Into a Table [message #655130 is a reply to message #655108] Mon, 22 August 2016 16:27 Go to previous messageGo to next message
cookiemonster
Messages: 13895
Registered: September 2008
Location: Rainy Manchester
Senior Member
One option? It's the only viable one.
Re: Entering Error Log Into a Table [message #655135 is a reply to message #655130] Mon, 22 August 2016 23:13 Go to previous message
Sandeepsm
Messages: 7
Registered: July 2016
Location: Greeny Kerala
Junior Member
Thank You Littlefoot & cookiemonster


Thanks&Regards
Sandy

--Every Accomplishment Starts With The Decision To TRY.
Previous Topic: Multilingual Display in Oracle Forms 6i
Next Topic: Oracle Forms 12c : Print Report Directly
Goto Forum:
  


Current Time: Tue Oct 27 13:48:55 CDT 2020