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 explain me what the project manager will ask in the interview.The interview is for senior position in .Net (5 years experience )
What is oauth in web api?
what is way of loading data in ef (entity framework)?
What is difference between razor and web form engine?
what is minimum requirement for entity framework applications to run?
What is RouteConfig.cs in ASP.Net MVC 4?
In Server how to check whether model has error or not in ASP.Net MVC
Is the following route definition a valid route definition? {controller}{action}/{id}
What is mapping in entity framework? : Entity framework
What is Differnce between html.action and ajax.action?
What are child actions in ASP.Net MVC?
Describe the gac in the .net framework.
What is entity framework firstordefault?
Describe the .net framework architecture.
Why to use '{resource}.axd/{*pathInfo}' in routing in ASP.Net MVC?