You are using the try? catch block seen in the following
code segment, but no exceptions are ever caught by the catch
block. What is the problem?

SqlConnection cn =new sqlConnection(strSQL);
SqlDataSet ds;
try
{
cn.open(); //perform the data processing steps
??..
} catch (OleDbException e) {
?..
}

a) The exception class is wrong; it should be sqlErrors.
b) The exception class is wrong; it should be
sqlSyntaxExceptios.
c) The exception class is wrong; it should be sqlExceptions.
d) The exception class is wrong; it should be sqlExcptions.

Answers were Sorted based on User's Feedback



You are using the try? catch block seen in the following code segment, but no exceptions are ever c..

Answer / js_m

c

Is This Answer Correct ?    4 Yes 0 No

You are using the try? catch block seen in the following code segment, but no exceptions are ever c..

Answer / nithya

C

Is This Answer Correct ?    4 Yes 0 No

Post New Answer

More ASP.NET Interview Questions

can s/w quality assurance engineer switch field to programming side i m very much interested in programming but not much good in it

0 Answers  


Is string a value type or a reference type?

13 Answers  


What is asp.net response object?

0 Answers  


Why session is more secure than cookies?

0 Answers  


Explain how viewstate is being formed?

0 Answers  






How can you enable impersonation in the web.config file?

0 Answers  


To call a Web service which transport protocol you can use?

3 Answers   Siebel,


What are type/key pairs in client script registration?

0 Answers  


What is the difference between c# and .net?

0 Answers  


How to execute a stored procedure.and how to call it form a asp page

2 Answers  


Who can consume WebAPI?

0 Answers  


How can exception be handled with out the use of try catch?

0 Answers  


Categories