Article ID: 949738 - Last Review: February 26, 2008 - Revision: 1.1

MCTS Self-Paced Training Kit (Exam 70-526): Microsoft .NET Framework 2.0 Windows-Based Client Development comments and corrections part 2

On This Page

Expand all | Collapse all

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.Additional comments and corrections are available in 929187 (http://support.microsoft.com/kb/929187) .

The following topics are covered:

  • 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 360: Sql1.UpdateCommand should be SqlDataAdapter1.UpdateCommand
  • Page 366: Code causes records to not save
  • Page 369: SqlDataAdapter should be SqlDataAdapter1
  • 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"
  • Pages 631-632: ToolBoxBitmap should be ToolboxBitmap
  • Page 653: "overrides" should be "override"
  • Page 655: Call to Refresh missing from C# code
  • Page 691: "SplitControl" should be "SplitContainer"
  • Page 691: "TabContainer" should be "TabControl"
  • 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

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 360: Sql1.UpdateCommand should be SqlDataAdapter1.UpdateCommand

On page 360, the 12th line in the C# sample code contains an incorrect DataAdapter

Change:
Sql1.UpdateCommand = UpdateCommand;

To:
SqlDataAdapter1.UpdateCommand = UpdateCommand;

Page 366: Code causes records to not save

On page 366, in Step 23 the last 3 lines of code in the VB and C# code example causes records to not be saved in Step 27.

Remove the following lines from the VB example:
' After the row is updated reset the table to reflect the changes
NorthwindDataSet1.Customers.Clear()
SqlDataAdapter1.Fill(NorthwindDataSet1.Customers)

Remove the following lines from the C# example:
// After the row is updated reset the table to reflect the changes
northwindDataSet1.Customers.Clear();
sqlDataAdapter1.Fill(northwindDataSet1.Customers);

Page 369: SqlDataAdapter should be SqlDataAdapter1

On page 369, the VB and C# code of Step 9 contain an incorrect DataAdapter.

Change:
' VB
Dim commands As New SqlCommandBuilder(SqlDataAdapter)

// C#
SqlCommandBuilder commands = new SqlCommandBuilder(SqlDataAdapter);

To:
' VB
Dim commands As New SqlCommandBuilder(SqlDataAdapter1)

// C#
SqlCommandBuilder commands = new SqlCommandBuilder(SqlDataAdapter1);

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

Pages 631-632: ToolBoxBitmap should be ToolboxBitmap

On pages 631 and 632, each of the code samples references ToolBoxBitmap rather than ToolboxBitmap.

Change:
' VB
<ToolBoxBitmap("C:\myToolboxBitmap.bmp")> Class myControl

To:
' VB
<ToolboxBitmap("C:\myToolboxBitmap.bmp")> Class myControl

Change:
// C#
[ToolBoxBitmap(@"C:\myToolboxBitmap.bmp")]

To:
// C#
[ToolboxBitmap(@"C:\myToolboxBitmap.bmp")]

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 691: "SplitControl" should be "SplitContainer"

On page 691, the second sentence under Case Scenario 1 contains an invalid control.

Change:
"Each SplitterPanel control in the SplitControl can then host additional container controls."

To:
"Each SplitterPanel control in the SplitContainer control can then host additional container controls."

Page 691: "TabContainer" should be "TabControl"

On page 691, the first sentence under Case Scenario 2 contains an invalid control.

Change:
"The TabContainer control can be used to display multiple pages of information and allow the user to switch between pages while keeping the information static."

To:
"The TabControl control can be used to display multiple pages of information and allow the user to switch between pages while keeping the information static."

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.

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

Article Translations