You must Sign In to post a response.
  • Category: ASP.NET

    how to catch error in raised by oracle sp

    how to catch error in raised by oracle sp
  • #289584
    use Try Catch Block to capture all type of error.


    '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

  • #289586
    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.

  • #289599
    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

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

  • #289613
    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 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.

  • This thread is locked for new responses. Please post your comments and questions as a separate thread.
    If required, refer to the URL of this page in your new post.