Microsoft KB Archive/929187

= MCTS Self-Paced Training Kit (Exam 70-526): Microsoft .NET Framework 2.0 Windows-Based Client Development Comments and Corrections =

Article ID: 929187

Article Last Modified on 11/28/2007

-

APPLIES TO


 * MCTS Self-Paced Training Kit (Exam 70-526): Microsoft .NET Framework 2.0 Windows-Based Client Development, ISBN 0-7356-2333-3

-



SUMMARY
This article contains comments, corrections, and information about known errors relating to the Microsoft Press book MCTS Self-Paced Training Kit (Exam 70-526): Microsoft .NET Framework 2.0 Windows-Based Client Development, 978-0-7356-2333-0.

The following topics are covered:


 * CD-ROM: Missing files needed for Lesson 4 in Chapter 6
 * CD-ROM: &quot;ImageIndex&quot; should be &quot;ImageList&quot;
 * CD-ROM: &quot;composite&quot; should be &quot;custom&quot;
 * CD-ROM: == should be !=
 * Page 19: Property Grid used in place of Toolbox
 * Pages 22 and 23: Incorrect code in C# answers
 * Page 25: Select should be Double-click
 * Page 31: TopBottom should be replaced with TopDown
 * Page 33: Column numbering stated to begin at 1 rather than 0
 * Page 38: the words False and True should be reversed
 * Page 43: True missing from code sample
 * Page 44: The word &quot;on&quot; in missing from answer B to question 3
 * Page 53: TabOrder should be replaced with TabIndex
 * Page 56: spacing should be alignment
 * Page 69: MouseClickEventArgs should be replaced with MouseEventArgs
 * Page 75: right should be left
 * Page 85: $12,345.00 should be $12,345.67
 * Page 102: ListBox1.IndexOf should be ListBox1.Items.IndexOf
 * Page 109: null should be -1
 * Page 111: Incorrect description for Parent property in Table 3-7
 * Page 111: Incorrect description for PrevNode property in Table 3-7
 * Page 132: &quot;ImageIndex&quot; should be &quot;ImageList&quot;
 * Page 138: Incorrect character used in Size property
 * Page 154: containers should be panels
 * Page 156: Sample BMP files not located on Companion CD
 * Page 162: Incorrect capitalization in the word Flow
 * Page 164: &quot;enabled&quot; should be &quot;displayed&quot;
 * Page 165: &quot;FileToolStripMenuItem&quot; should be &quot;fileToolStripMenuItem&quot;
 * Page 168: &quot;UnChecked&quot; should be &quot;Unchecked&quot;
 * Page 183: &quot;event&quot; should be &quot;method&quot;
 * Page 189: Incorrect operator used in C# Step 2
 * Page 196: &quot;MergeItem&quot; should be &quot;MergeAction&quot;
 * Page 203: &quot;State&quot; property includes incorrect description
 * Page 206: Missing characters in C# code sample
 * Page 233: Invalid character in Button 3 property names
 * Page 236, Question 1: Answer concerning error range 20-29 is incorrect
 * Page 257: &quot;DML&quot; used in place of &quot;DDL&quot;
 * Page 260: &quot;DDL&quot; used in place of &quot;DML&quot;
 * Page 261: &quot;Figure 6-2&quot; should be &quot;Table 6-5&quot;
 * Page 262: Missing restriction in Table 6-6
 * Page 263: Missing quotation in C# code
 * Page 263: Wrong loop end in C# code
 * Page 275: SqlParameter used in place of SqlCommand
 * Page 285: Stored procedures missing in Northwind Database
 * Page 319: Definition of &quot;Serializable&quot; is incorrect
 * Page 340: Sql1 referenced in place of SqlDataAdapter1
 * Page 352: ForeignKey class referenced in place of ForeignKeyConstraint
 * Page 370: Additional Provider information needed in VB and C# code
 * Page 390: C# code contains an error
 * Page 418: Incorrect capitalization in the code sample
 * Pages 457 & 458: &quot;myReader&quot; should be &quot;myWriter&quot;
 * Page 463: InnerXml should be ReadInnerXml and OuterXml should be ReadOuterXml
 * Page 539: &quot;Label2&quot; and &quot;Label 4&quot; should be &quot;Label1&quot; and &quot;Label3&quot;
 * Page 544: Incorrect instruction for setting the MdiParent property
 * Page 545: Multiple errors in C# code sample
 * Page 549: IsMdiContainer referred to as IsMdiParent
 * Page 561: &quot;TabOrder&quot; referenced in place of &quot;TabIndex&quot;
 * Page 567: &quot;Minimum&quot; used in place of &quot;Maximum&quot;
 * Page 571: Incorrect value used in AutoPopDelay property formula
 * Page 581: &quot;DefaultSettings&quot; should be &quot;Default&quot;
 * Page 597: &quot;must&quot; is used in place of &quot;most&quot;
 * Page 653: &quot;overrides&quot; should be &quot;override&quot;
 * Page 655: Call to Refresh missing from C# code
 * Page 707: ODBC should be Oracle and vice versa
 * Page 723: InnerXml should be ReadInnerXml and OuterXml should be ReadOuterXml
 * Page 729: IsMdiContainer referred to as IsMdiParent
 * Page 742: Definition for &quot;delegate&quot; incorrect



CD-ROM: Missing files needed for Lesson 4 in Chapter 6
The files Customers.fmt and NorthwindCustomers.txt that are needed to complete Lesson 4 in Chapter 6 on page 310 are not located on CD as is stated in the Training Kit.

The following file is available for download from the Microsoft Download Center:

Customers.exe

For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:

119591

How to Obtain Microsoft Support Files from Online Services Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file.

CD-ROM: &quot;ImageIndex&quot; should be &quot;ImageList&quot;
One of the Readiness Review assessment questions contains an answer with an incorrect C# component.

The question reads:

&quot;Which of the following code examples correctly associates an image from an ImageList component with a Button control? Assume an ImageList component named ImageList1 and a Button control named Button1. (Choose all that apply.)&quot;

In the correct answer change: Button1.ImageList = ImageList1 Button1.ImageKey = &quot;myImage&quot;

// C# button1.ImageIndex = imageList1; button1.ImageKey = &quot;myImage&quot;;

To: Button1.ImageList = ImageList1 Button1.ImageKey = &quot;myImage&quot;

// C# button1.ImageList = imageList1; button1.ImageKey = &quot;myImage&quot;;

CD-ROM: &quot;composite&quot; should be &quot;custom&quot;
In the Readiness Review assessment, Question 27 (526P_6.1.7_01) uses an incorrect control.

Change:

&quot;You are creating a composite control. You want to provide a transparent background color. How can you do this? (Choose all that apply.)&quot;

To:

&quot;You are creating a custom control. You want to provide a transparent background color. How can you do this? (Choose all that apply.)&quot;

CD-ROM:
should be != ===

One of the Readiness Review assessment questions contains an answer with an incorrect C# component.

The question reads:

&quot;You created a Windows Forms application. The application performs long-running operations, and you create a BackgroundWorker object named BackgroundWorker1. You create a method named BackgroundWorker1_RunWorkerCompleted to respond when the process has completed successfully, ended in an error, or been cancelled by the user. The method declaration is:&quot;

In the third answer, the first line contains a &quot;==&quot; symbol rather than a &quot;!=&quot; symbol.

Change: if (e.Error == null)

To: if (e.Error != null)

Page 19: Property Grid used in place of Toolbox
On page 19, the first sentence of Step 4 reads:

&quot;Drag a Button from the Property Grid to the upper left-hand corner of the form.&quot;

It should read:

&quot;Drag a Button from the Toolbox to the upper left-hand corner of the form.&quot;

Pages 22 and 23: Incorrect code in C# answers
On pages 22 and 23, the aPath line in the C# section of every answer to question 2 reads:

aPath.AddEllipse(0, 0, Me.Width, Me.Height);

It should read:

aPath.AddEllipse(0, 0, this.Width, this.Height);

Page 25: Select should be Double-click
On page 25, the third bullet point is incorrect.

Change:

&quot;Select a control in the Toolbox and double-click the form.&quot;

To:

&quot;Double-click a control in the Toolbox.&quot;

Page 31: TopBottom should be replaced with TopDown
On page 31, the third sentence of the FlowDirection description of Table 1-6 reads:

&quot;Can be set to LeftToRight, RightToLeft, TopBottom, or BottomUp.&quot;

It should read:

&quot;Can be set to LeftToRight, RightToLeft, TopDown, or BottomUp.&quot;

Page 33: Column numbering stated to begin at 1 rather than 0
On page 33, the first two sentences of the fourth paragraph read:

&quot;Columns in a TableLayoutPanel are numbers starting at 1, while rows start at 0. Thus, the example shown above adds aButton to the cell in column 3 at row 3, which is actually the 3rd column and the 4th row the user sees.&quot;

It should read:

&quot;Columns and rows in a TableLayoutPanel are numbers starting at 0. Thus, the example shown above adds aButton to the cell in column 3 at row 3, which is actually the 4th column and the 4th row the user sees.&quot;

Page 38: the words False and True should be reversed
On page 38, the last two sentences in the second to the last paragraph read:

&quot;Note that you cannot set both of these controls to False. For example, if you set Panel1Collapsed to False when the Panel2Collapsed is already set to False, Panel2Collapsed will be set to True.&quot;

They should read:

&quot;Note that you cannot set both of these controls to True. For example, if you set Panel1Collapsed to True when the Panel2Collapsed is already set to True, Panel2Collapsed will be set to False.&quot;

Page 43: True missing from code sample
On page 43, Answer C to question 1 is missing a parameter.

Change:

' VB FLPanel1.SetFlowBreak(aButton) // C# FLPanel1.SetFlowBreak(aButton);

To:

' VB FLPanel1.SetFlowBreak(aButton, True) // C# FLPanel1.SetFlowBreak(aButton, true);

Page 44: The word &quot;on&quot; in missing from answer B to question 3
On page 44, answer B to question 3 reads:

&quot;Select a control in the Toolbox and draw the form with the mouse.&quot;

It should read:

&quot;Select a control in the Toolbox and draw on the form with the mouse.&quot;

Page 53: TabOrder should be replaced with TabIndex
On page 53, the 5th property in Tabel 2-1 reads:

&quot;TabOrder&quot;

It should read:

&quot;TabIndex&quot;

Page 56: spacing should be alignment
On page 56, step 3 of the &quot;To adjust control alignment with the Layout toolbar&quot; section refers to spacing instead of alignment.

Change:

&quot;Adjust the control spacing by clicking the appropriate button.&quot;

To:

&quot;Adjust the control alignment by clicking the appropriate button.&quot;

Page 69: MouseClickEventArgs should be replaced with MouseEventArgs
On page 69, the first sentence of the 2nd paragraph reads:

&quot;One of the arguments for the Button.MouseDown event handler is an instance of MourseClickEventArgs.&quot;

It should read:

&quot;One of the arguments for the Button.MouseDown event handler is an instance of MourseEventArgs.&quot;

The last sentence of the 2nd paragraph reads:

&quot;Table 2-3 describes the properties of the MourseClickEventArgs class.&quot;

It should read:

&quot;Table 2-3 describes the properties of the MourseEventArgs class.&quot;

The first sentence of the 3rd paragraph reads:

&quot;Using the values exposed by the MouseClickEventArgs instance, you can determine the button that was clicked and the position of the mouse wheel.&quot;

It should read:

&quot;Using the values exposed by the MouseEventArgs instance, you can determine the button that was clicked and the position of the mouse wheel.&quot;

Page 75: right should be left
On page 75, the answer to Quick Check 1 references the right button rather than the left button.

Change:

&quot;The Click event responds to the right button click, and the MouseDown event can be used to respond to other button clicks.&quot;

To:

&quot;The Click event responds to the left button click, and the MouseDown event can be used to respond to other button clicks.&quot;

Page 85: $12,345.00 should be $12,345.67
On page 85, the ammount indicated in the Displayed Text column of the $99,999.00 row is incorrect.

Change:

&quot;$12,345.00 – Note that the actual currency symbol, thousands separator, and decimal separator will be determined by the control’s FormatProvider.&quot;

To:

&quot;$12,345.67 – Note that the actual currency symbol, thousands separator, and decimal separator will be determined by the control’s FormatProvider.&quot;

Page 102: ListBox1.IndexOf should be ListBox1.Items.IndexOf
On page 102, the first code sample is incorrect.

Change:

&quot;' VB Dim anIndex As Integer anIndex = ListBox1.IndexOf(&quot;A String&quot;)

// C# int anIndex; anIndex = listBox1.IndexOf(&quot;A String&quot;);&quot;

To:

&quot;' VB Dim anIndex As Integer anIndex = ListBox1.Items.IndexOf(&quot;A String&quot;)

// C# int anIndex; anIndex = listBox1.Items.IndexOf(&quot;A String&quot;);&quot;

Page 109: null should be -1
On page 109, the second sentence of the ImageKey property in Table 3-6 contains an incorrect property.

Change:

&quot;If the ImageKey property is set, the ImageIndex property is set to null.&quot;

To:

&quot;If the ImageKey property is set, the ImageIndex property is set to -1.&quot;

Page 111: Incorrect description for Parent property in Table 3-7
On page 111, the description for the Parent property in Table 3-7 is incorrect.

Change:

&quot;Returns the parent node of the current node. If the current node is a root node in the TreeView, accessing this property will throw a NullReferenceException.&quot;

To:

&quot;Returns the parent node of the current node. If the current node is a root node in the TreeView, accessing this property will return null.&quot;

Page 111: Incorrect description for PrevNode property in Table 3-7
On page 111, the description for the PrevNode property in Table 3-7 is incorrect.

Change:

&quot;Returns the previous node.&quot;

To:

&quot;Returns the previous sibling tree node.&quot;

Page 132: &quot;ImageIndex&quot; should be &quot;ImageList&quot;
On page 132, Question 3 Answer D contains an incorrect C# component.

Change:

D. ' VB Button1.ImageList = ImageList1 Button1.ImageKey = &quot;myImage&quot;

// C# button1.ImageIndex = imageList1; button1.ImageKey = &quot;myImage&quot;;

To: D. ' VB Button1.ImageList = ImageList1 Button1.ImageKey = &quot;myImage&quot;

// C# button1.ImageList = imageList1; button1.ImageKey = &quot;myImage&quot;;

Page 138: Incorrect character used in Size property
On page 138, Step 2 of Exercise 1 uses an incorrect character for the Size property.

Change:

&quot;2. In the Properties window for Form1, set the Size property to 600,400.&quot;

To:

&quot;2. In the Properties window for Form1, set the Size property to 600;400.&quot;

Page 154: containers should be panels
On page 154, the last sentence of the second paragraph contains and incorrect Tool Strip type.

Change:

&quot;This results in the ToolStripContainer filling the entire form and having tool strip containers available on all sides.&quot;

To:

&quot;This results in the ToolStripContainer filling the entire form and having tool strip panels available on all sides.&quot;

Page 156: Sample BMP files not located on Companion CD
On page 156, Lab 1, Exercise 1, Step 7 states that the following image files can be found in the code folder on the companion CD: Back.bmp, Forward.bmp, Go.bmp, and Stop.bmp.

The files are not located on the CD. It is available for download from the Microsoft Download Center:

images.exe

For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:

119591How to Obtain Microsoft Support Files from Online Services

Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file.

Page 162: Incorrect capitalization in the word Flow
On page 162, in the description for the property LayoutStyle the F in &quot;HorizontalStackWithOverFlow&quot; and &quot;Vertical- StackWithOverFlow&quot; should not be capitalized.

Change:

&quot;A value of HorizontalStackWithOverFlow indicates that items are stacked horizontally and overflow as needed. Vertical- StackWithOverFlow stacks items vertically and overflows as needed.&quot;

To:

&quot;A value of HorizontalStackWithOverflow indicates that items are stacked horizontally and overflow as needed. Vertical- StackWithOverflow stacks items vertically and overflows as needed.&quot;

Page 164: &quot;enabled&quot; should be &quot;displayed&quot;
On page 164, the description for the ShowShortcutKeys property is incorrect.

Change:

&quot;Indicates whether shortcut keys are enabled.&quot;

To:

&quot;Indicates whether shortcut keys are displayed.&quot;

Page 165: &quot;FileToolStripMenuItem&quot; should be &quot;fileToolStripMenuItem&quot;
On page 165, in the second sentence at the top of the page the variable FileToolStripMenuItem has an incorrect capitalization.

Change:

&quot;For example, if you created a File menu item, the default name would be FileToolStripMenuItem.&quot;

To:

&quot;For example, if you created a File menu item, the default name would be fileToolStripMenuItem.&quot;

Page 168: &quot;UnChecked&quot; should be &quot;Unchecked&quot;
On page 168, the first complete sentence at the top of the page contains an incorrect capitalization in the word UnChecked.

Change:

&quot;The CheckState property on the other hand, indicates the actual state of the menu item and will return either CheckState.Checked,CheckState.UnChecked, or Checkstate.Indeterminate.&quot;

To:

&quot;The CheckState property on the other hand, indicates the actual state of the menu item and will return either CheckState.Checked,CheckState.Unchecked, or Checkstate.Indeterminate.&quot;

Page 183: &quot;event&quot; should be &quot;method&quot;
On page 183, the second sentence in Step 4 incorrectly uses the word &quot;event&quot;.

Change:

&quot;Choose the event you created in the Code Editor.&quot;

To:

&quot;Choose the method you created in the Code Editor.&quot;

Page 189: Incorrect operator used in C# Step 2
On page 189, Step 2 in the C# section uses an incorrect operator.

Change:

&quot;2. You can remove an event handler at run time by using the =- operator, as shown here:&quot;

To:

&quot;2. You can remove an event handler at run time by using the -= operator, as shown here:&quot;

Page 196: &quot;MergeItem&quot; should be &quot;MergeAction&quot;
On page 196, the first bullet point under Suggested Practices contains an incorrect property.

Change:

&quot;Create toolbars with similar members and practice merging them together, changing the MergeIndex and MergeItem properties of each tool strip item.&quot;

To:

&quot;Create toolbars with similar members and practice merging them together, changing the MergeIndex and MergeAction properties of each tool strip item.&quot;

Page 203: &quot;State&quot; property includes incorrect description
On page 203, in Table 5-2 the description of the property &quot;State&quot; is incorrect and needs to be changed.

Change:

&quot;Read only. Gets a string that describes the state of the connection.&quot;

To:

&quot;Read only. Gets a combination of System.Data.ConnectionState values that describes the state of the connection.&quot;

Page 206: Missing characters in C# code sample
On page 206, the C# code sample near the top of the page is missing closing characters and is incomplete.

Change: // C# private OracleConnection ConnectionToOracle = new OracleConnection (&quot;Data Source=Oracle8i;Integrated Security=yes; To: // C# private OracleConnection ConnectionToOracle = new OracleConnection (&quot;Data Source=Oracle8i;Integrated Security=yes&quot;);

Page 233: Invalid character in Button 3 property names
On page 233, the property names in Button 3 contain an incorrect character that needs to be removed.

Change: Button3: <Name = ConnectToInvalidDatabaseButton <Text = Connect to invalid database

To: Button3: Name = ConnectToInvalidDatabaseButton Text = Connect to invalid database

Page 236, Question 1: Answer concerning error range 20-29 is incorrect
On page 236, answers C and D of Question 1 reads:

&quot;C. Errors with a severity level of 20 through 29

D. Errors with a severity level of 30 or greater&quot;

They should read:

&quot;C. Errors with a severity level of 20 through 25

D. Errors with a severity level of 26 or greater&quot;

Page 257: &quot;DML&quot; used in place of &quot;DDL&quot;
On page 257, the first sentence of the second paragraph reads:

&quot;To execute commands that run DML actions (Data Manipulation Language), create commands that run SQL statements and call the ExecuteNonQuery method of the command.&quot;

It should read:

&quot;To execute commands that run DDL actions (Data Definition Language), create commands that run SQL statements and call the ExecuteNonQuery method of the command.&quot;

Page 260: &quot;DDL&quot; used in place of &quot;DML&quot;
On page 260, the third paragraph reads:

&quot;Each .NET Framework Data Provider Command object exposes three main execution methods that can be used to return data, update data, call stored procedures and functions, and so on, or perform catalog operations such as executing data definition language (DDL) commands against a data source.&quot;

It should read:

&quot;Each .NET Framework Data Provider Command object exposes three main execution methods that can be used to return data, update data, call stored procedures and functions, and so on, or perform catalog operations such as executing data manipulation language (DML) commands against a data source.&quot;

Page 261: &quot;Figure 6-2&quot; should be &quot;Table 6-5&quot;
On page 261, the first sentencen in the first paragraph contains an incorrect reference to Figure 6-2.

Change:

&quot;In addition to the execution commands listed in Figure 6-2, an additional set of commands are specifically used for asynchronous calls to a database.&quot;

To:

&quot;In addition to the execution commands listed in Table 6-5, an additional set of commands are specifically used for asynchronous calls to a database.&quot;

Page 262: Missing restriction in Table 6-6
On page 262, on Table 6-6 the commands BeginExecuteXMLReader and EndExecuteXMLReader are missing the note (SQLCommand only).

Change:

BeginExecuteXmlReader

To:

BeginExecuteXmlReader

(SQLCommand only)

Change:

EndExecuteXMLReader

To:

EndExecuteXMLReader

(SQLCommand only)

Page 263: Missing quotation in C# code
On page 263, the 6th line down in the C# code is missing a quotation mark in the definition of command1.

Change: SqlCommand command1 = new SqlCommand(&quot;WAITFOR DELAY '00:00:05'; &quot; +   Select * From [Order Details]&quot;, NorthWindConnection);

To: SqlCommand command1 = new SqlCommand(&quot;WAITFOR DELAY '00:00:05'; &quot; +   &quot;Select * From [Order Details]&quot;, NorthWindConnection);

Page 263: Wrong loop end in C# code
On page 263, the 16th line down in the C# code sample contains an incorrect loop end.

Change: for (int i = 0; i< reader.FieldCount - 1; i++)

To: for (int i = 0; i< reader.FieldCount; i++)

Page 275: SqlParameter used in place of SqlCommand
On page 275, the first sentence of the paragraph under &quot;Adding Parameters to Command Objects&quot; reads:

&quot;Command objects have a Parameters property that represents a collection of parameters for that command (for example, the SqlParameter.Parameters property).&quot;

It should read:

&quot;Command objects have a Parameters property that represents a collection of parameters for that command (for example, the SqlCommand.Parameters property).&quot;

Page 285: Stored procedures missing in Northwind Database
On page 285, in order to complete Exercise 3 you might have to create stored procedures in the Northwind Database for Get Freight Cost and Get Contact Name.

To create the GetFreightCost stored procedure use the following code:

CREATE PROCEDURE GetFreightCost @ORDERID INT, @Freight MONEY OUTPUT AS SELECT @Freight = Freight FROM Orders WHERE OrderID = @OrderID

To create the GetContactName stored procedure use the following code:

CREATE PROCEDURE GetContactName @Name NVARCHAR(40) OUTPUT AS SELECT @Name = ContactName FROM Customers WHERE CompanyName = @Name

Page 319: Definition of &quot;Serializable&quot; is incorrect
On page 319, the definition of Serializable reads:

&quot;Locks are placed on all data that is used in a query, preventing other users from updating the data. Prevents non-repeatable reads but phantom rows are still possible.&quot;

It should read:

&quot;A range lock is placed on the DataSet, preventing other users from updating or inserting rows into the dataset until the transaction is complete.&quot;

Page 340: Sql1 referenced in place of SqlDataAdapter1
On page 360, the second to last line of the C# code sample reads:

Sql1.UpdateCommand = UpdateCommand;

It should read:

SqlDataAdapter1.UpdateCommand = UpdateCommand;

Page 352: ForeignKey class referenced in place of ForeignKeyConstraint
On page 352, the first sentence of the &quot;How to Create a Foreign Key Constraint&quot; section reads:

&quot;Create foreign key constraints by creating an instance of the ForeignKey class and assigning the desired column or columns from the parent and child tables to the constraint.&quot;

It should read:

&quot;Create foreign key constraints by creating an instance of the ForeignKeyConstraint class and assigning the desired column or columns from the parent and child tables to the constraint.&quot;

Page 370: Additional Provider information needed in VB and C# code
On page 370, a NOTE needs to be added to step 7 that reads:

&quot;NOTE: If you are using SQL Server 7, SQL Server 2000 or SQL Server 2005 (all editions) you must change the Provider in line 5 of the VB and C# code to SQLNCLI instead of SQLOLEDB.&quot;

Page 390: C# code contains an error
On page 390, the 6th line in the C# code is missing brackets.

Change: row = NwDataDocument.GetRowFromElement(Xml.XmlElement)xmlNode;

To: row = NwDataDocument.GetRowFromElement((Xml.XmlElement)xmlNode);

Page 418: Incorrect capitalization in the code sample
On page 418, the C# code sample reads:

customersBindingSource = New BindingSource(northwindDataSet1, &quot;Customers&quot;);

It should read:

customersBindingSource = new BindingSource(northwindDataSet1, &quot;Customers&quot;);

Pages 457 & 458: &quot;myReader&quot; should be &quot;myWriter&quot;
On pages 457 & 458, the VB and C# code samples that start at the bottom of page 457 and continue on to 458 contain incorrect methods.

Change: ' VB myReader.WriteStartElement(&quot;FirstNames&quot;) myReader.WriteAttributeString(&quot;Nicknames&quot;, &quot;Ok&quot;) myWriter.WriteElementString(&quot;Name&quot;, &quot;Libby&quot;) myReader.WriteEndElement

// C# myReader.WriteStartElement(&quot;FirstNames&quot;); myReader.WriteAttributeString(&quot;Nicknames&quot;, &quot;Ok&quot;); myWriter.WriteElementString(&quot;Name&quot;, &quot;Libby&quot;); myReader.WriteEndElement;

To: ' VB myWriter.WriteStartElement(&quot;FirstNames&quot;) myWriter.WriteAttributeString(&quot;Nicknames&quot;, &quot;Ok&quot;) myWriter.WriteElementString(&quot;Name&quot;, &quot;Libby&quot;) myWriter.WriteEndElement

// C# myWriter.WriteStartElement(&quot;FirstNames&quot;); myWriter.WriteAttributeString(&quot;Nicknames&quot;, &quot;Ok&quot;); myWriter.WriteElementString(&quot;Name&quot;, &quot;Libby&quot;); myWriter.WriteEndElement;

Page 463: InnerXml should be ReadInnerXml and OuterXml should be ReadOuterXml
On page 463, answers C & D to Question 2 contain incorrect methods.

Change: C. ' VB myReader.MoveToAttribute(&quot;length&quot;) MsgBox(myReader.InnerXml) // C# myReader.MoveToAttribute(&quot;length&quot;); MessageBox.Show(myReader.InnerXml); D. ' VB myReader.MoveToAttribute(&quot;length&quot;) MsgBox(myReader.OuterXml) // C# myReader.MoveToAttribute(&quot;length&quot;); MessageBox.Show(myReader.OuterXml);

To: C. ' VB myReader.MoveToAttribute(&quot;length&quot;) MsgBox(myReader.ReadInnerXml) // C# myReader.MoveToAttribute(&quot;length&quot;); MessageBox.Show(myReader.ReadInnerXml); D. ' VB myReader.MoveToAttribute(&quot;length&quot;) MsgBox(myReader.ReadOuterXml) // C# myReader.MoveToAttribute(&quot;length&quot;); MessageBox.Show(myReader.ReadOuterXml);

Page 539: &quot;Label2&quot; and &quot;Label 4&quot; should be &quot;Label1&quot; and &quot;Label3&quot;
On page 539, Step 6 contains incorrect Label names in the Label column of the table.

Change:

&quot;Label2 Währung-Format

Label4 Aktuelle Uhrzeit &quot;

To:

&quot;Label1 Währung-Format

Label3 Aktuelle Uhrzeit&quot;

Page 544: Incorrect instruction for setting the MdiParent property
On page 544, step 3 reads:

&quot;In a method in the parent form, such as a menu item Click event handler, create a new instance of the child form and set its MdiParent property to True, as shown in the following example:&quot;

It should read:

&quot;In a method in the parent form, such as a menu item Click event handler, create a new instance of the child form and set its MdiParent property, as shown in the following example:&quot;

Page 545: Multiple errors in C# code sample
On page 545, the second C# code sample block on the page contains multiple coding errors.

On the 5th line down change: if (this.ActiveControl.GetType is TextBox)

To: if (activeForm.ActiveControl is TextBox)

On the 7th line down change: TextBox aTextBox = (TextBox)this.ActiveControl;

To: TextBox aTextBox = (TextBox)activeForm.ActiveControl;

Page 549: IsMdiContainer referred to as IsMdiParent
On page 549, answer A to question 1 reads:

&quot;Set the IsMdiParent property of the parent form to True.&quot;

It should read:

&quot;Set the IsMdiContainer property of the parent form to True.&quot;

Page 561: &quot;TabOrder&quot; referenced in place of &quot;TabIndex&quot;
On page 561, the Property column in the last row of the first table reads:

&quot;TabOrder&quot;

It should read:

&quot;TabIndex&quot;

Page 567: &quot;Minimum&quot; used in place of &quot;Maximum&quot;
On page 567, the third sentence of the first paragraph reads:

&quot;Likewise, when the Value property is the same value as the Minimum property, the ProgressBar control appears completely filled.&quot;

It should read:

&quot;Likewise, when the Value property is the same value as the Maximum property, the ProgressBar control appears completely filled.&quot;

Page 571: Incorrect value used in AutoPopDelay property formula
On page 571, the 4th sentence in the second paragraph from the bottom incorrectly states that the AutoPopDelay is set to 5 times the AutomaticDelay property.

Change:

&quot;The AutoPopDelay property is set to 5 * N milliseconds, and the ReshowDelay property is set to N/5 milliseconds.&quot;

To:

&quot;The AutoPopDelay property is set to 10 * N milliseconds, and the ReshowDelay property is set to N/5 milliseconds.&quot;

Page 581: &quot;DefaultSettings&quot; should be &quot;Default&quot;
On page 581, the C# code sample near the top of the page contains an incorrect object.

Change: // C# Properties.Settings.DefaultSettings.TitleSetting = &quot;This is the new Title&quot;; Properties.Settings.DefaultSettings.Save;

To: // C# Properties.Settings.Default.TitleSetting = “This is the new Title”; Properties.Settings.Default.TitleSetting.Save;

Page 597: &quot;must&quot; is used in place of &quot;most&quot;
On page 597, the second sentence of the 2nd paragraph reads:

&quot;BackgroundWorker supports the ability to cancel a background process, but you must implement must of the cancellation code yourself.&quot;

It should read:

&quot;BackgroundWorker supports the ability to cancel a background process, but you must implement most of the cancellation code yourself.&quot;

Page 653: &quot;overrides&quot; should be &quot;override&quot;
On page 653, the first line in the C# code example contains an incorrect keyword.

Change: protected overrides void OnPaint(System.Windows.Forms.PaintEventArgs pevent)

To: protected override void OnPaint(System.Windows.Forms.PaintEventArgs pevent)

Page 655: Call to Refresh missing from C# code
On page 655, the C# code at the top of the page is missing a line.

Change: // C# protected override void OnClick(EventArgs e) { mClicks++; base.OnClick(e); }

To: // C# protected override void OnClick(EventArgs e) { mClicks++; base.OnClick(e); this.Refresh; }

Page 707: ODBC should be Oracle and vice versa
On page 707, the explanations for answers A and D for question 1 of Lesson 6 are incorrect.

Change:

&quot;A. Incorrect. Integrated security = yes is used for ODBC connections.&quot;

To:

&quot;A. Incorrect. Integrated security = yes is used for Oracle connections.&quot;

Change:

&quot;D. Incorrect. Trusted_Connection = yes is used for Oracle connections.&quot;

To:

&quot;D. Incorrect. Trusted_Connection = yes is used for ODBC connections.&quot;

Page 723: InnerXml should be ReadInnerXml and OuterXml should be ReadOuterXml
Page 723, answers C & D to Question 2 contain incorrect methods.

Change:

&quot;C. Correct. The MoveToAttribute method allows you to specify either an attribute name or index. The attribute value is exposed via the InnerXml property.

D. Incorrect. When positioned on an attribute, the OuterXml property returns the name of the attribute as well as the value.&quot;

To:

&quot;C. Correct. The MoveToAttribute method allows you to specify either an attribute name or index. The attribute value is exposed via the ReadInnerXml property.

D. Incorrect. When positioned on an attribute, the ReadOuterXml property returns the name of the attribute as well as the value.&quot;

Page 729: IsMdiContainer referred to as IsMdiParent
On page 729, answer A to question 1 of Lesson 3 reads:

&quot;Correct. You must create a parent form by setting the IsMdiParent property to True.&quot;

It should read:

&quot;Correct. You must create a parent form by setting the IsMdiContainer property to True.&quot;

Page 742: Definition for &quot;delegate&quot; incorrect
On page 742, the definition for &quot;delegate&quot; reads:

&quot;A type-date function pointer that can be used to call a method synchronously or asynchronously.&quot;

It should read:

&quot;A type-safe function pointer that can be used to call a method synchronously or asynchronously.&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.

Additional query words: 0-7356-2333-3 978-0-7356-2333-0

Keywords: KB929187

-

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

© Microsoft Corporation. All rights reserved.