Microsoft KB Archive/905037

= Microsoft ADO.NET 2.0 Step by Step Comments and Corrections =

Article ID: 905037

Article Last Modified on 10/4/2007

-

APPLIES TO


 * Microsoft ADO.NET 2.0 Step by Step, ISBN 0-7356-2164-0

-



SUMMARY
This article contains comments, corrections, and information about known errors relating to the Microsoft Press book Microsoft ADO.NET 2.0 Step by Step, ISBN 0-7356-2164-0.

The following topics are covered:


 * Page 4: Other Providers should be Other Consumers
 * Page 7: EmployeesForm.cs should be Employees.cs
 * Page 42: StateChangeEventArts referenced in place of StateChangeEventArgs
 * Page 44: Additional words included in the middle of step 4
 * Page 89: Instructions indicate pressing F7 rather than Shift-F7
 * Page 91: True and false behavior of the ContinueUpdateOnError property is reversed
 * Page 106: &quot;RecordsEffected&quot; should be &quot;RecordsAffected&quot;
 * Page 143: Rows referenced in place of Columns
 * Page 245: Two variables referenced instead of one



Page 4: Other Providers should be Other Consumers
On page 4, the Data Consumers portion of the figure includes an incorrect item.

Change:

&quot;Other Providers&quot;

To:

&quot;Other Consumers&quot;

Page 7: EmployeesForm.cs should be Employees.cs
On page 7, step 2 refers to an incorrect file.

Change:

&quot;Open the Chapter 01 – Start project, and if necessary, double-click Employees.vb (or EmployeesForm.cs if you’re using C#) to open the form.&quot;

To:

&quot;Open the Chapter 01 – Start project, and if necessary, double-click Employees.vb (or Employees.cs if you’re using C#) to open the form.&quot;

Page 42: StateChangeEventArts referenced in place of StateChangeEventArgs
On page 42, the second sentence of the &quot;StateChange Events&quot; section reads:

&quot;The event passes a StateChangeEventArts object to its handler, which, in turn, has two properties: OriginalState and CurrentState.&quot;

It should read:

&quot;The event passes a StateChangeEventArgs object to its handler, which, in turn, has two properties: OriginalState and CurrentState.&quot;

Page 44: Additional words included in the middle of step 4
On page 44, the first sentence of step 4 reads:

&quot;To Connection states, add the following display the previous and current Connection states, add the following code to the cnSql_StateChange event handler:&quot;

It should read:

&quot;To display the previous and current Connection states, add the following code to the cnSql_StateChange event handler:&quot;

Page 89: Instructions indicate pressing F7 rather than Shift-F7
On page 89, the first step of the Preview the Results of a DataAdapter procedure reads:

&quot;1. Press F7 to display the Form Designer.&quot;

It should read:

&quot;1. Press Shift-F7 to display the Form Designer.&quot;

Page 91: True and false behavior of the ContinueUpdateOnError property is reversed
On Page 91, the second paragraph reads:

&quot;The ContinueUpdateOnError property determines how the DataAdapter behaves if an error is encountered during an update. If this property is set to True, the DataAdapter throws an exception and stops the update. If it is set to False, the update to that DataRow is skipped, the error is placed in its RowError property, and processing continues with the next row.&quot;

It should read:

&quot;The ContinueUpdateOnError property determines how the DataAdapter behaves if an error is encountered during an update. If this property is set to False, the DataAdapter throws an exception and stops the update. If it is set to True, the update to that DataRow is skipped, the error is placed in its RowError property, and processing continues with the next row.&quot;

Page 106: &quot;RecordsEffected&quot; should be &quot;RecordsAffected&quot;
On page 106, the third sentence in the first paragraph contains an incorrect property.

Change:

&quot;The RowUpdated event argument also exposes one additional property, RecordsEffected, which is a read-only value that indicates the number of rows that were changed.&quot;

To:

&quot;The RowUpdated event argument also exposes one additional property, RecordsAffected, which is a read-only value that indicates the number of rows that were changed.&quot;

Page 143: Rows referenced in place of Columns
On page 143, there are several references to 'rows' which should read 'columns'.

The first code sample of step 1 and lines 9-11 of the second code sample of step 1 read:

dr = dsAdoSbs.CreateDataReader(dsAdoSbs.Employees) MessageBox.Show(&quot;The DataTableReader has &quot; & dr.FieldCount.ToString & _   &quot; rows&quot;)

They should read:

dr = dsAdoSbs.CreateDataReader(dsAdoSbs.Employees) MessageBox.Show(&quot;The DataTableReader has &quot; & dr.FieldCount.ToString & _   &quot;columns&quot;)

The second sentence of step 3 reads:

&quot;The application displays the number of rows in the DataTable.&quot;

It should read:

&quot;The application displays the number of columns in the DataTable.&quot;

The screenshot at the end of the page is incorrect and should be disregarded.

Page 245: Two variables referenced instead of one
On page 245, the first sentence references two temporary variables, when only one is used.

Change:

&quot;This code first creates two temporary variables, and then it sets them to the Update command of the daEmployees DataAdapter and to the row currently being displayed on the form, respectively.&quot;

To:

&quot;This code first creates a temporary variable and sets it to the row currently being displayed on the form.&quot;

Microsoft Press is committed to providing informative and accurate books. All comments and corrections listed above are ready for inclusion in future printings of this book. If you have a later printing of this book, it may already contain most or all of the above corrections.

The print number of the book is located on the copyright page in the form of a string of numbers. For example: &quot;2 3 4 5 6 7 8 0 QWT 9 8 76 5 4&quot;. The first number in the string is the the print number. In this example, the print number is 2.

Additional query words: 0-7356-2164-0 978-0-7356-2164-0

Keywords: kbfix kbinfo kbdocerr KB905037

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.