Microsoft KB Archive/929187

From BetaArchive Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
Knowledge Base


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: "ImageIndex" should be "ImageList"
  • CD-ROM: "composite" should be "custom"
  • 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 "on" 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: "ImageIndex" should be "ImageList"
  • 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: "enabled" should be "displayed"
  • Page 165: "FileToolStripMenuItem" should be "fileToolStripMenuItem"
  • Page 168: "UnChecked" should be "Unchecked"
  • Page 183: "event" should be "method"
  • Page 189: Incorrect operator used in C# Step 2
  • Page 196: "MergeItem" should be "MergeAction"
  • Page 203: "State" 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: "DML" used in place of "DDL"
  • Page 260: "DDL" used in place of "DML"
  • Page 261: "Figure 6-2" should be "Table 6-5"
  • 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 "Serializable" 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: "myReader" should be "myWriter"
  • Page 463: InnerXml should be ReadInnerXml and OuterXml should be ReadOuterXml
  • Page 539: "Label2" and "Label 4" should be "Label1" and "Label3"
  • 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: "TabOrder" referenced in place of "TabIndex"
  • Page 567: "Minimum" used in place of "Maximum"
  • Page 571: Incorrect value used in AutoPopDelay property formula
  • Page 581: "DefaultSettings" should be "Default"
  • Page 597: "must" is used in place of "most"
  • Page 653: "overrides" should be "override"
  • 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 "delegate" incorrect


MORE INFORMATION

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: "ImageIndex" should be "ImageList"

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

The question reads:
"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.)"

In the correct answer change:

Button1.ImageList = ImageList1
Button1.ImageKey = "myImage"

// C#
button1.ImageIndex = imageList1;
button1.ImageKey = "myImage";


To:

Button1.ImageList = ImageList1
Button1.ImageKey = "myImage"

// C#
button1.ImageList = imageList1;
button1.ImageKey = "myImage";



CD-ROM: "composite" should be "custom"

In the Readiness Review assessment, Question 27 (526P_6.1.7_01) uses an incorrect control.

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

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

CD-ROM: == should be !=

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

The question reads:
"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:"

In the third answer, the first line contains a "==" symbol rather than a "!=" 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:

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

It should read:

"Drag a Button from the Toolbox to the upper left-hand corner of the form."

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:
"Select a control in the Toolbox and double-click the form."

To:
"Double-click a control in the Toolbox."

Page 31: TopBottom should be replaced with TopDown

On page 31, the third sentence of the FlowDirection description of Table 1-6 reads:

"Can be set to LeftToRight, RightToLeft, TopBottom, or BottomUp."

It should read:

"Can be set to LeftToRight, RightToLeft, TopDown, or BottomUp."

Page 33: Column numbering stated to begin at 1 rather than 0

On page 33, the first two sentences of the fourth paragraph read:

"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."

It should read:

"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."

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:

"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."

They should read:

"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."

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 "on" in missing from answer B to question 3

On page 44, answer B to question 3 reads:

"Select a control in the Toolbox and draw the form with the mouse."

It should read:

"Select a control in the Toolbox and draw on the form with the mouse."

Page 53: TabOrder should be replaced with TabIndex

On page 53, the 5th property in Tabel 2-1 reads:

"TabOrder"

It should read:

"TabIndex"

Page 56: spacing should be alignment

On page 56, step 3 of the "To adjust control alignment with the Layout toolbar" section refers to spacing instead of alignment.

Change:
"Adjust the control spacing by clicking the appropriate button."

To:
"Adjust the control alignment by clicking the appropriate button."

Page 69: MouseClickEventArgs should be replaced with MouseEventArgs

On page 69, the first sentence of the 2nd paragraph reads:

"One of the arguments for the Button.MouseDown event handler is an instance of MourseClickEventArgs."

It should read:

"One of the arguments for the Button.MouseDown event handler is an instance of MourseEventArgs."

The last sentence of the 2nd paragraph reads:

"Table 2-3 describes the properties of the MourseClickEventArgs class."

It should read:

"Table 2-3 describes the properties of the MourseEventArgs class."

The first sentence of the 3rd paragraph reads:

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

It should read:

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

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:
"The Click event responds to the right button click, and the MouseDown event can be used to respond to other button clicks."

To:
"The Click event responds to the left button click, and the MouseDown event can be used to respond to other button clicks."

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:
"$12,345.00 – Note that the actual currency symbol, thousands separator, and decimal separator will be determined by the control’s FormatProvider."

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

Page 102: ListBox1.IndexOf should be ListBox1.Items.IndexOf

On page 102, the first code sample is incorrect.

Change:
"' VB

Dim anIndex As Integer
anIndex = ListBox1.IndexOf("A String")


// C#

int anIndex;
anIndex = listBox1.IndexOf("A String");"


To:
"' VB

Dim anIndex As Integer
anIndex = ListBox1.Items.IndexOf("A String")


// C#

int anIndex;
anIndex = listBox1.Items.IndexOf("A String");"



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:
"If the ImageKey property is set, the ImageIndex property is set to null."

To:
"If the ImageKey property is set, the ImageIndex property is set to -1."

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:
"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."

To:
"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."

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:
"Returns the previous node."

To:
"Returns the previous sibling tree node."

Page 132: "ImageIndex" should be "ImageList"

On page 132, Question 3 Answer D contains an incorrect C# component.

Change:
D.

' VB
Button1.ImageList = ImageList1
Button1.ImageKey = "myImage"

// C#
button1.ImageIndex = imageList1;
button1.ImageKey = "myImage";


To: D.

' VB
Button1.ImageList = ImageList1
Button1.ImageKey = "myImage"

// C#
button1.ImageList = imageList1;
button1.ImageKey = "myImage";


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:
"2. In the Properties window for Form1, set the Size property to 600,400."

To:
"2. In the Properties window for Form1, set the Size property to 600;400."

Page 154: containers should be panels

On page 154, the last sentence of the second paragraph contains and incorrect Tool Strip type.

Change:
"This results in the ToolStripContainer filling the entire form and having tool strip containers available on all sides."

To:
"This results in the ToolStripContainer filling the entire form and having tool strip panels available on all sides."

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 "HorizontalStackWithOverFlow" and "Vertical- StackWithOverFlow" should not be capitalized.

Change:
"A value of HorizontalStackWithOverFlow indicates that items are stacked horizontally and overflow as needed. Vertical- StackWithOverFlow stacks items vertically and overflows as needed."

To:
"A value of HorizontalStackWithOverflow indicates that items are stacked horizontally and overflow as needed. Vertical- StackWithOverflow stacks items vertically and overflows as needed."

Page 164: "enabled" should be "displayed"

On page 164, the description for the ShowShortcutKeys property is incorrect.

Change:
"Indicates whether shortcut keys are enabled."

To:
"Indicates whether shortcut keys are displayed."

Page 165: "FileToolStripMenuItem" should be "fileToolStripMenuItem"

On page 165, in the second sentence at the top of the page the variable FileToolStripMenuItem has an incorrect capitalization.

Change:
"For example, if you created a File menu item, the default name would be FileToolStripMenuItem."

To:
"For example, if you created a File menu item, the default name would be fileToolStripMenuItem."

Page 168: "UnChecked" should be "Unchecked"

On page 168, the first complete sentence at the top of the page contains an incorrect capitalization in the word UnChecked.

Change:
"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."

To:
"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."

Page 183: "event" should be "method"

On page 183, the second sentence in Step 4 incorrectly uses the word "event".

Change:
"Choose the event you created in the Code Editor."

To:
"Choose the method you created in the Code Editor."

Page 189: Incorrect operator used in C# Step 2

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

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

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

Page 196: "MergeItem" should be "MergeAction"

On page 196, the first bullet point under Suggested Practices contains an incorrect property.

Change:
"Create toolbars with similar members and practice merging them together, changing the MergeIndex and MergeItem properties of each tool strip item."

To:
"Create toolbars with similar members and practice merging them together, changing the MergeIndex and MergeAction properties of each tool strip item."

Page 203: "State" property includes incorrect description

On page 203, in Table 5-2 the description of the property "State" is incorrect and needs to be changed.

Change:
"Read only. Gets a string that describes the state of the connection."

To:
"Read only. Gets a combination of System.Data.ConnectionState values that describes the state of the connection."

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
("Data Source=Oracle8i;Integrated Security=yes;

To:

// C#
private OracleConnection ConnectionToOracle = new OracleConnection
("Data Source=Oracle8i;Integrated Security=yes");


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:

"C. Errors with a severity level of 20 through 29
D. Errors with a severity level of 30 or greater"

They should read:
"C. Errors with a severity level of 20 through 25
D. Errors with a severity level of 26 or greater"

Page 257: "DML" used in place of "DDL"

On page 257, the first sentence of the second paragraph reads:

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

It should read:

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

Page 260: "DDL" used in place of "DML"

On page 260, the third paragraph reads:

"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."

It should read:

"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."

Page 261: "Figure 6-2" should be "Table 6-5"

On page 261, the first sentencen in the first paragraph contains an incorrect reference to Figure 6-2.

Change:
"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."

To:
"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."

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("WAITFOR DELAY '00:00:05'; " +
    Select * From [Order Details]", NorthWindConnection);


To:

SqlCommand command1 = new SqlCommand("WAITFOR DELAY '00:00:05'; " +
    "Select * From [Order Details]", 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 "Adding Parameters to Command Objects" reads:

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

It should read:

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

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 "Serializable" is incorrect

On page 319, the definition of Serializable reads:

"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."

It should read:

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

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 "How to Create a Foreign Key Constraint" section reads:

"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."

It should read:

"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."

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:

"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."

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, "Customers");


It should read:

customersBindingSource = new BindingSource(northwindDataSet1, "Customers");



Pages 457 & 458: "myReader" should be "myWriter"

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("FirstNames")
myReader.WriteAttributeString("Nicknames", "Ok")
myWriter.WriteElementString("Name", "Libby")
myReader.WriteEndElement()

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


To:

' VB
myWriter.WriteStartElement("FirstNames")
myWriter.WriteAttributeString("Nicknames", "Ok")
myWriter.WriteElementString("Name", "Libby")
myWriter.WriteEndElement()

// C#
myWriter.WriteStartElement("FirstNames");
myWriter.WriteAttributeString("Nicknames", "Ok");
myWriter.WriteElementString("Name", "Libby");
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("length")
MsgBox(myReader.InnerXml)
// C#
myReader.MoveToAttribute("length");
MessageBox.Show(myReader.InnerXml);
D. ' VB
myReader.MoveToAttribute("length")
MsgBox(myReader.OuterXml)
// C#
myReader.MoveToAttribute("length");
MessageBox.Show(myReader.OuterXml);


To:

C. ' VB
myReader.MoveToAttribute("length")
MsgBox(myReader.ReadInnerXml)
// C#
myReader.MoveToAttribute("length");
MessageBox.Show(myReader.ReadInnerXml);
D. ' VB
myReader.MoveToAttribute("length")
MsgBox(myReader.ReadOuterXml)
// C#
myReader.MoveToAttribute("length");
MessageBox.Show(myReader.ReadOuterXml);


Page 539: "Label2" and "Label 4" should be "Label1" and "Label3"

On page 539, Step 6 contains incorrect Label names in the Label column of the table.

Change:
"Label2 Währung-Format
Label4 Aktuelle Uhrzeit "

To:
"Label1 Währung-Format
Label3 Aktuelle Uhrzeit"

Page 544: Incorrect instruction for setting the MdiParent property

On page 544, step 3 reads:

"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:"

It should read:

"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:"

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:

"Set the IsMdiParent property of the parent form to True."

It should read:

"Set the IsMdiContainer property of the parent form to True."

Page 561: "TabOrder" referenced in place of "TabIndex"

On page 561, the Property column in the last row of the first table reads:

"TabOrder"

It should read:

"TabIndex"

Page 567: "Minimum" used in place of "Maximum"

On page 567, the third sentence of the first paragraph reads:

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

It should read:

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

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:
"The AutoPopDelay property is set to 5 * N milliseconds, and the ReshowDelay property is set to N/5 milliseconds."

To:
"The AutoPopDelay property is set to 10 * N milliseconds, and the ReshowDelay property is set to N/5 milliseconds."

Page 581: "DefaultSettings" should be "Default"

On page 581, the C# code sample near the top of the page contains an incorrect object.

Change:

// C#
Properties.Settings.DefaultSettings.TitleSetting = "This is the new Title";
Properties.Settings.DefaultSettings.Save();


To:

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


Page 597: "must" is used in place of "most"

On page 597, the second sentence of the 2nd paragraph reads:

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

It should read:

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

Page 653: "overrides" should be "override"

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:
"A. Incorrect. Integrated security = yes is used for ODBC connections."

To:
"A. Incorrect. Integrated security = yes is used for Oracle connections."

Change:
"D. Incorrect. Trusted_Connection = yes is used for Oracle connections."

To:
"D. Incorrect. Trusted_Connection = yes is used for ODBC connections."

Page 723: InnerXml should be ReadInnerXml and OuterXml should be ReadOuterXml

Page 723, answers C & D to Question 2 contain incorrect methods.

Change:
"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."

To:
"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."

Page 729: IsMdiContainer referred to as IsMdiParent

On page 729, answer A to question 1 of Lesson 3 reads:

"Correct. You must create a parent form by setting the IsMdiParent property to True."

It should read:

"Correct. You must create a parent form by setting the IsMdiContainer property to True."

Page 742: Definition for "delegate" incorrect

On page 742, the definition for "delegate" reads:

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

It should read:

"A type-safe function pointer that can be used to call a method synchronously or asynchronously."

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