how to handle sql exceptions?

Answer Posted / minhajul islam

using try block we can trap the error as follows

try
{
//Datanase coding
}
catch(SQLException e1)
{
//Here you will get SQL Error message in e1 instance
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Whats the difference between abstract factory pattern and factory pattern?

595


What is the appSettings Section in the web.config file?

580


What is the difference between a multi-layer and multi-tier applications?

569


What is the extension of master page in asp.net?

543


Explain automatic memory management in .net.

588






How to integrate angular 8 with asp.net mvc 5? : Asp.Net MVC

494


What is event in asp.net?

532


What are sharepoint pages?

494


What are the advantages of using session?

432


What are early binding and late binding.

564


What is difference between session and cookie?

512


how can we create wcf in asp.net and how can we cll that in to asp.net application?plsss tel me each step clearly

1542


How does asp net store session ids by default?

532


What is the maximum timeout we can set for Cookies?

549


How to add DateTime Control in normal DataGrid Server Control?

580