C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




how to catch error in asp.net raised by oracle sp


Posted Date: 29 Aug 2008      Total Responses: 4

Posted By: sudheshna        Member Level: Bronze     Points: 1


how to catch error in asp.net raised by oracle sp



Responses

Author: Ritesh N. Jain    29 Aug 2008Member Level: GoldRating:     Points: 3
use Try Catch Block to capture all type of error.

try

'your code here.

catch exc as exception
'Here you can see error message and it's source using exc.InnerException or simply exc.Message to know about error
End Try





Author: sudheshna     29 Aug 2008Member Level: BronzeRating:     Points: 3
ok. as you said i have done that,...but here i will get the message from oracle for ex:-ORA-06502: PL/SQL: numeric or value error: character to number conversion error ORA-06512: at line 1 ....instead of this i want to display user freindly message.


Author: Ritesh N. Jain    29 Aug 2008Member Level: GoldRating:     Points: 4
Very first thing if you know that Parameter suppose to be Number than you have to validate that at UI level it self before passing into Database Tier,and secondly you can show your own message in Catch block e.g


try
'Your saving code
catch exc as exception
labMessage.Text = "Unable to save the records,please input proper value"
end try




Author: sudheshna     29 Aug 2008Member Level: BronzeRating:     Points: 5
ok. i have some other question. if your are interested please answer me.
it is regarding xsl and xml. i want to chk in xsl if xml file missing then i have to catch and diplay some message. no dot net here...it is only xsl and xml. for ex
<xsl: variable name="doc1" value="xml1.xml">...this will work if xml file exists...if there is no xml file then it will raise an error which i have to handle....if you this please let me know. thanks in advance.



Post Reply
You must Sign In to post a response.
Next : ASP.NET PROJECTS TITLES
Previous : CheckBoxList with DropDownList in ASP Net 2.0
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

internet fax

Contact Us    Privacy Policy    Terms Of Use