how to handle sql exceptions?

Answers were Sorted based on User's Feedback



how to handle sql exceptions?..

Answer / gomathi

Sql exception can be handled through try,catch and finally
block.

Is This Answer Correct ?    35 Yes 2 No

how to handle sql exceptions?..

Answer / 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

how to handle sql exceptions?..

Answer / ashish maurya

1)Using TRy,catch,finally block.
2)using @@Error just after DML statements.

Is This Answer Correct ?    0 Yes 0 No

how to handle sql exceptions?..

Answer / prince

not possible

Is This Answer Correct ?    2 Yes 23 No

Post New Answer

More ASP.NET Interview Questions

What is caching and types of caching ?

2 Answers   Infosys,


What are the session variables?

0 Answers  


What is the difference between response.redirect and server.transfer, how to choose one among the other?

3 Answers   247Customer,


how to implement some securty aspect in our application i.e 1.cookie poisioning. 2.data encryption. 3.forcefull browsing 4.sql/code injection 5.securing web app by using web services ........my question is how to implement these thing in our application is this done by hard coding or by help of some tool

0 Answers   Satyam,


How many types of session state management options available in asp.net?

0 Answers  






What is different authentication mechanisms used in ASP.NET?

0 Answers   Amdocs,


when will garbage collector run?

1 Answers  


Explain file-based dependency and key-based dependency.

0 Answers   MindCracker,


In what languages in ASP written?

4 Answers   Microsoft,


What is custom tag in Web.Config?

0 Answers   Accenture,


What is aspect-oriented programming?

0 Answers  


Where the assembly is stored in asp.net?

0 Answers  


Categories