Hour 13

for RuBoard

Quiz Answers

1:

What is the Catch block used for?

  1. Processing error conditions

  2. Else processing

  3. Common processing

A1:

a. Processing error conditions from a Try block. Any exception in the Try block will transfer control to the Catch block for determination.

2:

True or false: ADO.NET cannot tell you if you have any errors indicated in a DataSet .

A2:

False. If utilized, this capability can retain errors on each row in the dataset.

3:

True or false: Always close a connection in the Finally block.

A3:

True. In general, it is good practice to close a connection. Doing so in a Finally block is good practice if the open connection was in the corresponding Try block.

4:

You can set errors in a DataSet at what level?

  1. DataTable level

  2. DataRow level

  3. Column level

  4. Data type level

A4:

a, b, and c. You have the flexibility to set errors at all three levels. What's more, if you set an error at the row level, you can test the table for errors at higher levels (for example, at the table level using the HasErrors method).

5:

True or false: There is no way to pass DataRow error indications to other XML consumers or Web services.

A5:

False. You can utilize the DiffGram structure to encapsulate the data, schema, and data row error information.

6:

What is the most commonly used DataAdapter event?

  1. FillError event

  2. DataUpdated event

  3. RowUpdated event

  4. RowUpdating event

A6:

c. RowUpdated is the most widely used event because it reflects the outcome of the updates against the data source after they have been completed. This usage is especially common when looking for optimistic concurrency violations.

for RuBoard


Sams Teach Yourself ADO. NET in 24 Hours
Sams Teach Yourself ADO.NET in 24 Hours
ISBN: 0672323834
EAN: 2147483647
Year: 2002
Pages: 237

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net