Hour 19

for RuBoard

Quiz Answers

1:

CommandBuilder will generate UPDATE and DELETE statements following which concurrency model?

  1. Pessimistic concurrency model

  2. Optimistic concurrency model

  3. Data update concurrency model

A1:

b. The optimistic concurrency model, which means that other users can update data that has been selected by your application and your application must check for this before committing your updates.

2:

True or false: Automatically generated commands will be created for all SelectCommands coded in Visual Basic or C#.

A2:

False. You must explicitly activate this capability by using the CommandBuilder object.

3:

What must be done following the change of a SELECT statement when using CommandBuilder to automatically generate code?

  1. Reassign SELECT variables

  2. Refresh metadata

  3. Close connection

  4. Open connection

A3:

b. Refresh metadata. This is done using the .Refreshschema() method. You would then clear out ( .Remove ) the DataSet and fill it again for further processing.

4:

True or false: The following SELECT statement is valid for using with CommandBuilder :

 SELECT a.*, b.* FROM Customers a, Orders b WHERE a.CustomerID = b.CustomerID 
A4:

False. The SelectCommand to be used with CommandBuilder must not span multiple tables.

5:

The SelectCommand that will be used for the CommandBuilder must:

  1. Include a SELECT Distinct clause

  2. Contain all columns in the table

  3. Return at least one primary key or unique column

  4. Contain a WHERE clause with at least one filter

A5:

c. Return at least one primary key or unique column. The UPDATE and DELETE statements must be able to locate the exact data row for update/delete to ensure integrity.

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