Home » SQL & PL/SQL » SQL & PL/SQL » Web Page and PL/SQL
Web Page and PL/SQL [message #386118] Thu, 12 February 2009 15:13 Go to next message
ramtin
Messages: 37
Registered: November 2008
Member
Hi all,

I am using PL/SQL to create HTML page and in one page I have 10 fields in one form. When I enter values for those fields then Click in SUBMIT button that works fine. If even one of those field get value then click on SUMBIT the works fine. The problem is when all fields in empty and Click on SUBMIT button then I get error:

ORA-01403: no data found
ORA-06512: at "MARKET.MBPKADRS", line 2796
ORA-06512: at line 31

How can I stop this error because this page for modify information and maybe user does have any information (all 10 fields empty) and the user who went to this page want to do not change any fields and just click to SUBMIT button and next procedure will check the change and if no change just give a message. Please advice.

Thank you in advance.
Re: Web Page and PL/SQL [message #386120 is a reply to message #386118] Thu, 12 February 2009 15:44 Go to previous messageGo to next message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
By putting in an exception handler for NO_DATA_FOUND.
Re: Web Page and PL/SQL [message #386214 is a reply to message #386120] Fri, 13 February 2009 02:54 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Or by adding a hidden field to the web page that always has a value in it - that way at least one value will always be sent to the app. server.
Re: Web Page and PL/SQL [message #386217 is a reply to message #386214] Fri, 13 February 2009 03:02 Go to previous messageGo to next message
dr.s.raghunathan
Messages: 540
Registered: February 2008
Senior Member
dear JRowBottom,

i agree and your solution is fine. But one of my assistant says that using NVL(column_name, null) for all the column, one can insert empty record. Though, it is not possible by present versions of oracle, it was made possible on older versions. Is it true?
yours
dr.s.raghunathan
Re: Web Page and PL/SQL [message #386221 is a reply to message #386217] Fri, 13 February 2009 03:20 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
I've never heard of that as a workround before - if it did work in older versions of Oracle and doesn't now, then I guess it
was a bug.
It certainly sounds like a bug - Why using NVL to replace a null with another null should help escapes me - do you have some sample code

The best way to handle this would be to have a single procedure for unpacking the values from web pages, and sinply handle the NDF exception in that
Re: Web Page and PL/SQL [message #386272 is a reply to message #386214] Fri, 13 February 2009 06:47 Go to previous messageGo to next message
ramtin
Messages: 37
Registered: November 2008
Member
Thanks for your reply. Could you please tell me how should I add a hidden field. Please explain more.

Thanks a lot
Re: Web Page and PL/SQL [message #386288 is a reply to message #386272] Fri, 13 February 2009 07:41 Go to previous message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
SOrry to hear that Google is broken where you are.

Any of these s should see you on the right path.
Previous Topic: Regular Expression (3 threads merged by bb)
Next Topic: PRAGMA AUTONOMOUS_TRANSACTION (merged)
Goto Forum:
  


Current Time: Tue Feb 18 09:30:13 CST 2025