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 strongly typed in c#?

655


What is the namespace for the thread class?

704


Explain the 3 types of properties in c# with an example?

732


How do you specify a custom attribute for the entire assembly?

656


What is generic types in c#?

672


Is null == null c#?

641


What is difference between yielding and sleeping?

630


How can I create a process that is running a supplied native executable (e.g., Cmd.exe)?

790


What I can do with c#?

710


write code for inserting and updating recoards in sql server database using connected architecture & records shoulds displayed in grid view ( use c# )

2172


Explain how do I convert a string to an int in c#?

698


What is the use of console readkey ()?

732


Can you create an instance of a static class?

744


Explain the difference between abstract class and interface in .net?

671


What are the extension methods in c#?

657