Requirement is:

try
{
\\SQL Query
}
catch(Exception i)
{
print a
}
catch(SQLQueryException e)
{
\\SQL Query
}


Qu)I Got Exception in "try" block. Which "catch" statement
(i.e. 1st catch or 2nd catch ) catches the exception and
Why???

Answer Posted / meena

In try block the SQL query will be executed so the exception
will match the SQLException catch because all type of SQL
exception will be match in this SQLException

if we wrote normal query in try block then it will match
Exception catch

Is This Answer Correct ?    5 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are child actions in ASP.Net MVC?

785


mention what are the various methods provided by the dataset object to generate xml?

809


What are the 3 segments of the default route, that is present in an ASP.NET MVC application?

815


What is associationset? : Entity framework

795


Is it possible to share a view across multiple controllers?

752


Will c# 3.0, vb.net 9.0, atlas, or linq be included in the .net framework 3.0?

713


What are Code Blocks in Views?

867


Is razor a server side?

717


What is storage model? : Entity framework

764


What is page life cycle?

704


What is viewdata?

787


Is .net framework going away?

764


Can you use Razor code in Javascript in ASP.Net MVC?

888


Can I add mvc testcases in visual studio express?

773


Describe the .net framework architecture.

813