Which code segment should you insert at line 11?
A. catch (OleDbException ex){Trace.WriteLine(“ExceptionType: ” + ex.Source);Trace.WriteLine(“Message: ” + ex.Message);}
B. catch (OleDbException ex){Trace.WriteLine(“ExceptionType: ” + ex.InnerException.Source);Trace.WriteLine(“Message: ” + ex.InnerException.Message);}
C. catch (DbException ex){Trace.WriteLine(“ExceptionType: ” + ex.Source);Trace.WriteLine(“Message: ” + ex.Message); }
D. catch (DbException ex){Trace.WriteLine(“ExceptionType: ” + ex.InnerException.Source);Trace.WriteLine(“Message: ” + ex.InnerException.Message);}
Answer:C
Which code segment should you insert at line 11?
A. catch (OleDbException ex){Trace.WriteLine(“ExceptionType: ” + ex.Source);Trace.WriteLine(“Message: ” + ex.Message);} B. catch (OleDbException ex){Trace.WriteLine(“ExceptionType: ” + ex.InnerException.Source);Trace.WriteLine(“Message: ” + ex.InnerException.Message);} C. catch (DbException ex){Trace.WriteLine(“ExceptionType: ” + ex.Source);Trace.WriteLine(“Message: ” + ex.Message); } D. catch (DbException ex){Trace.WriteLine(“ExceptionType: ” + ex.InnerException.Source);Trace.WriteLine(“Message: ” + ex.InnerException.Message);}