how to handle errors in sqlserver



how to handle errors in sqlserver..

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

More C Sharp Interview Questions

What is a static property. Give an example?

0 Answers  


What are Sealed Classes in C#?

27 Answers   DataPoint, Wipro,


What?s the difference between an interface and abstract class?

4 Answers  


What is parallel foreach in c#?

0 Answers  


Can Any body send C Sharp latest interview questions to my mail id: alim.mtech@gmail.com.

1 Answers  


List the difference between interface and abstract class?

0 Answers  


What do you mean by directing?

0 Answers  


i have a question which is quite simple but yet complicated for me my question is why do we use void, if it does not return anything to the compiler? if it is used for normal display it can also be done by what is called Console.Write() or Consol.WriteLine() and if i do not use void with my method then my compiler throws me an error. if i return a value say integer then i write public int fun() display of the result can also be done here then why is it so necessary to use void with a function and why so compiler throw us an error if v don't use void return type?

2 Answers  


How do I create a delegate/multicastdelegate?

0 Answers  


What is the difference between struct and class in c#?

3 Answers  


What is the use of "default" and "Using" keyword?

3 Answers   TCS,


What is singleordefault?

0 Answers  


Categories