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
Explain the difference between viewbag and viewdata in mvc?
What is .net framework in simple terms?
What is oauth in web api?
What are the advantages of asp.net mvc?
What is representational state transfer (rest) mean?
What does a viewmodel do?
Why to use '{resource}.axd/{*pathInfo}' in routing in ASP.Net MVC?
What are the components required to create a route in mvc?
what is eager loading?
What is difference between html.beginform and ajax.beginform?
If we write any code for DataGrid methods, what is the access specifier used for that methods in the code behind file and why?
Explain what is routing?
What are the possible razor view extensions?
What you mean by routing in asp.net mvc?
What is RouteConfig.cs in ASP.Net MVC 4?