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 the difference between a constant and a static readonly field?

0 Answers  


Why are local variables stored in stack?

0 Answers  


Do unused Namespaces in c# affect run-time performance?

0 Answers   HCL,


Can we have 2 main methods in c#?

0 Answers  


wipro interview question on 28-Apr-10 1.what type of authentication used in web service, 2.what are type of multithreding ? 3.diff bet delegate and multithreading? 4.how to write update query trigger in stored procedure. 5. if you are so sharp then what happens when you click .net appln exe in system,who CLR get loaded. 6.how to use work flown in application. 7.what is main purpose of script manager. 8.how u handle cretical transaction. 9.how you syncronize the method from no of user, 10.how change name of shared assambly

1 Answers  






Can we return two values from a function?

12 Answers   MD Synergy,


What is the difference between early binding and late binding in c#?

0 Answers  


Any exceptions are there which are not caught by any catch blocks? what are they?

5 Answers   Honeywell, TCS,


If you define integer variable and a object variable and a structure then how those will be plotted in memory ?

1 Answers  


Is a dll an assembly?

0 Answers  


What is a dbml?

0 Answers  


if a base class has a number of overloaded constructors, and an inheriting class has a number of overloaded constructors; can you enforce a call from an inherited constructor to a specific base constructor?

0 Answers   Siebel Systems,


Categories