how to handle errors in sqlserver

Answer Posted / kiran vaidya

There is a separate class provided by .Net framework to
handle sql exceptions (errors).


try
{
.......
//Sql Operations
.......
}

catch(SqlException e)
{
//You can have all details of your sql exception by
//the object e.
}

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between == and object.equals?

501


Why do we use static methods in c#?

530


Define a class and an object?

556


what is object-oriented programming (oop) language?

481


Can a class have static constructor?

545






What is multidimensional array in c#?

460


What is difference between method overriding and method overloading?

526


What is a class level variable in c#?

493


What is a protected class in c#?

486


What does == mean in c sharp?

510


Where is the keyword void used?

546


What are Memory foot print of an exe?

502


What does do in c#?

533


Can we set image Source dynamically using C# in WPF application?

628


Explain About Virtual functions and their use.

552