Microsoft KB Archive/326875

= MCAD/MCSD Self-Paced Training Kit: Developing Windows-Based Applications with Microsoft Visual Basic .NET and Microsoft Visual C# .NET Comments And Corrections =

Article ID: 326875

Article Last Modified on 5/7/2003

-

APPLIES TO


 * MSPRESS MCAD/MCSD Self-Paced Training Kit Developing Windows-Based Applications With Microsoft Visual Basic.Net And Microsoft Visual C#.Net, ISBN 0-7356-1533-0

-



This article was previously published under Q326875



SUMMARY
This article contains comments, corrections, and information about known errors relating to the Microsoft Press book MCAD/MCSD Self-Paced Training Kit: Developing Windows-Based Applications with Microsoft Visual Basic .NET and Microsoft Visual C# .NET, ISBN 0-7356-1533-0.

The following topics are covered:


 * CD-ROM: Test Engine Uninstall Disables Visual Studio .NET Functionality
 * Page xxvi: Correction To Requirements
 * Page 11: Missing As
 * Page 11: Incorrect Statement About Variable Default Initialization in C#
 * Page 13: Incorrect Information About Aliasing in Visual Basic.NET
 * Page 13: Corrections To Code Sample
 * Page 16: &quot;Public Integer Spin&quot; Should Be &quot;Public Spin as Integer&quot;
 * Page 20: Missing &quot;Return Result&quot;
 * Page 31: Object1 Should Be Object2
 * Page 38: Timer Update Interval Correction
 * Page 39: Correction To Step 2
 * Page 56: Active Should Be Activate
 * Page 59: Deactivated Should Be Deactivate
 * Page 60: CancelEventArgsCancel Should Be CancelEventArgs.Cancel
 * Page 64: Tab Index Should Be Tab Order
 * Page 78: Correction To Access Keys
 * Page 96: Libby Should Be Joe
 * Pages 104 And 505: Shortcut Should Be Context
 * Page 119: (day DaysOfWeek) Should Be (DaysOfWeek day)
 * Page 124: Missing In Both Code Samples
 * Page 150: Incorrect Comment Mark
 * Page 209: Incorrect Step Over And Step Out Shortcut Key
 * Page 229: Correction To Lesson Goals
 * Page 244: Project Name Correction
 * Page 245: Correction To Names
 * Page 245: Additional Code Correction Step In Exercise 5.1
 * Page 246: Values Of Test Cases
 * Page 258: Correction To SqlCommand
 * Page 271: Incorrect Concatenation Character
 * Page 282: DataSet should be DataTable
 * Page 283: DataSet should be DataTable
 * Page 287: myDataRow Should Be myDataColumn
 * Page 293: Transaction Should Be Command
 * Page 320: ConnectionText should be CommandText
 * Page 324: DataRelation Should Be Relation
 * Page 327: Change To Visual C# Sample Code
 * Page 356: Missing ) After (button)
 * Page 420: Correction To Sample Visual Basic Code
 * Page 462: Missing Dashes In Comment
 * Page 505: Correction to Question 4 Answer



CD-ROM: Test Engine Uninstall Disables Visual Studio .NET Functionality
An error has been discovered that occurs when you uninstall the developing Web/Win apps test engine. You are left unable to open a new project in Visual Studio, with an error that Automation Server Can't Create Object.

The workaround is to re-register the windows/system32/scrrun.dll file with the following steps:


 * 1) Open the command prompt.
 * 2) Change directory to windows\system32: Type cd\windows\system32 and press enter.
 * 3) Verify that the scrrun.dll file is in the system32 directory: Type dir scrrun* and press enter. The file name should be displayed.
 * 4) You now need to register scrrun.dll: Type regsvr32 scrrun.dll and press enter. You should get a message that the registration was successful.

You should now be able to open a new project in Visual Studio.

Page xxvi: Correction To Requirements
On page xxvi, in the second bullet,

Change:

&quot;Microsoft Certified Solution Developers are required to pass three core Microsoft Windows operating system technology exams and one BackOffice technology elective exam.&quot;

To:

&quot;Microsoft Certified Solution Developer (MCSD) for Microsoft .NET candidates are required to pass four core exams and one elective exam.&quot;

Page 11: Missing As
On page 11, under &quot;Using Value Type and Reference Type Variables&quot;,

change:

&quot;Dim x, y Integer&quot;

to:

&quot;Dim x, y As Integer&quot;

Page 11: Incorrect Statement About Variable Default Initialization in C#
On page 11, the final paragraph of the section &quot;Reference Types&quot; incorrectly states that in C# variables are not given default initialization. In fact, variables of a reference type have a default value of null.

Change:

&quot;In C#, variables are not given default initialization. Any attempt to use an uninitialized variable, whether at a class level or a method level, will result in an error.&quot;

To:

&quot;In C#, variables of a reference type have a default value of null. It is generally not recommended that you rely on the default value, and these variables should not be used uninitialized.&quot;

Page 13: Corrections To Code Sample
On page 13, in the second Visual C# code example, there are two capitalization errors (one in line 3, one in line 4) and &quot;anotherWidget&quot; is missing from the third line of code.

Change: // You can now refer to MyNameSpaceTwo as myAlias. The // following two lines produce the same result: MyNameSpaceTwo.Widget = new myNameSpaceTwo.Widget MyAlias anotherWidget = new myAlias To: // You can now refer to MyNameSpaceTwo as myAlias. The // following two lines produce the same result: MyNameSpaceTwo.Widget anotherWidget = new MyNameSpaceTwo.Widget myAlias anotherWidget = new myAlias

Page 13: Incorrect Information About Aliasing in Visual Basic.NET
On page 13, remove the line above &quot;Referencing External Libraries&quot;:

&quot;Aliasing is not available in Visual Basic.NET.&quot;

Page 16: &quot;Public Integer Spin&quot; Should Be &quot;Public Spin as Integer&quot;
On page 16, in the second line from the bottom,

Change:

&quot;Public Integer Spin&quot;

To:

&quot;Public Spin as Integer&quot;

Page 20: Missing &quot;Return Result&quot;
On page 20, in the code sample for &quot;Visual Basic.NET&quot;,

Change: Result = first + second End Function To: Result = first + second Return Result End Function

Page 31: Object1 Should Be Object2
On page 31, in the last line,

Change:

&quot;Object1.MyField = 20&quot;

To:

&quot;Object2.MyField = 20&quot;

Page 38: Timer Update Interval Correction
On page 38, in the first paragraph of Exercise 1.2, Demonstrating Garbage Collection, there is the statement that an invisible timer updates the label control every second. The example included on the CD, however, actually does this update every tenth of a second.

Page 39: Correction To Step 2
On page 39, Step 2,

Change:

&quot;Right-click Form1 and choose View Code. The code window opens.&quot;

To:

&quot;Double-click Button1 to create the click event handler for Button1.&quot;

Page 56: Active Should Be Activate
On page 56, under the first &quot;Visual C#&quot;,

Change:

&quot;myForm.Active;&quot;

To:

&quot;myForm.Activate;&quot;

Page 59: Deactivated Should Be Deactivate
On page 59, in the &quot;Activated/Deactivated&quot; section, the form event &quot;Deactivate&quot; is incorrectly referred as &quot;Deactivated&quot;. All instances of &quot;Deactivated&quot; should be changed to &quot;Deactivate&quot; in this section.

Page 60: CancelEventArgsCancel Should Be CancelEventArgs.Cancel
On page 60, under &quot;Visual C#&quot;,

Change:

&quot;CancelEventArgsCancel = true;&quot;

To:

&quot;CancelEventArgs.Cancel = true;&quot;

Page 64: Tab Index Should Be Tab Order
On page 64, in the second step 1,

Change:

&quot;1. From the View menu, choose Tab Index.&quot;

To:

&quot;1. From the View menu, choose Tab Order.&quot;

Page 78: Correction To Access Keys
On page 78, under Access Keys, remove:

&quot;When it is open, you can choose Alt+N to create a new item.&quot;

Page 96: Libby Should Be Joe
On page 96, in Table 2.2,

Change:

&quot;Libby's Doughnut Factory&quot;

To:

&quot;Joe's Doughnut Factory&quot;

Pages 104 And 505: Shortcut Should Be Context
On pages 104 and 505, in question 6,

Change:

&quot;shortcut menu&quot;

To:

&quot;context menu&quot;

Page 119: (day DaysOfWeek) Should Be (DaysOfWeek day)
On page 119, in the second Visual C# sample code, change:

(day DaysOfWeek) To:

(DaysOfWeek day)

Page 124: Missing In Both Code Samples
On page 124, in both code samples for Visual C#,

Change:

System.Collections.ArrayList myList = new System.Collections.ArrayList;

...

Widget myWidget = new Widget; To:

System.Collections.ArrayList myList = new System.Collections.ArrayList;

...

Widget myWidget = new Widget;

Page 150: Incorrect Comment Mark
On page 150, in the code sample,

Change: // A default value for price

To: ' A default value for price

Page 209: Incorrect Step Over And Step Out Shortcut Key
On page 209, in Table 5.1, Change:

&quot;Step Into F11 Step Over F10&quot;

To:

&quot;Step Into F8 Step Over Shift+F8&quot;

Page 229: Correction To Lesson Goals
On page 229, in the first paragraph

Remove:

&quot;Additionally, you will learn how to create a multicultural test environment and to provide multicultural test data to your application.&quot;

Also remove the second and third bullets on this page:

&quot;Explain how to create a multicultural test environment for your application&quot;

&quot;Describe how to provide multicultural test data to your application&quot;

Page 244: Project Name Correction
On page 244, step 3 of the exercise, the file names given, CalculatorVB and CalculatorCSharp, are incorrect.

Change:

&quot;...and choose either CalculatorVB or CalculatorCSharp, ...&quot;

To:

&quot;...and choose either VB or C Sharp,...&quot;

Page 245: Correction To Names
On page 245, in steps 4 and 5, the first instance of CurrentOperation and Register2 should be misspelled to match the error message.

Change:

&quot;4. Double-click the first error in the Task List. You are taken to an error that cannot find a member named CurrentOperation. Change this statement to read CurrentOperation to correct the error.

5. Double-click the final error in the Task List. Correct the spelling of Register2 to correct the error.&quot;

To:

&quot;4. Double-click the first error in the Task List. You are taken to an error that cannot find a member named CurretOperation. Change this statement to read CurrentOperation to correct the error.

5. Double-click the final error in the Task List. Correct the spelling of Regiter2 to correct the error.&quot;

Page 245: Additional Code Correction Step In Exercise 5.1
In the section &quot;To identify and correct syntax errors&quot; on page 245, an additional step is required to correct the project code in order to complete the following Lab section &quot;To identify and correct a run-time error&quot;. Add the following step:

7. Locate the NumberHandler method.

For VB, change: CurrentNumberString = CurrentNumberString & CType((CType(sender, Textbox).Tag), String) To: CurrentNumberString = CurrentNumberString & CType((CType(sender, Button).Tag), String)

For C#, change: CurrentNumberString = CurrentNumberString + ((TextBox)sender).Tag.ToString; To: CurrentNumberString = CurrentNumberString + ((Button)sender).Tag.ToString;

Page 246: Values Of Test Cases
On page 246, the values given for columns CurrentNumberString and CurrentNumberString Expected for the first test case in Table 5.4 are incorrect.

In addition, the column header &quot;Value of LabelDisplay.Text&quot; should read &quot;Value of DisplayLabel.Text&quot;

Change:

To:

Page 258: Correction To SqlCommand
On page 258, in the second paragraph under &quot;Using Data Commands&quot;,

Change:

&quot;The SqlCommand class is designed to interact specifically with Microsoft SQL Server 7.0&quot;

To:

&quot;The SqlCommand class is designed to interact specifically with Microsoft SQL Server 7.0 and above&quot;

Page 271: Incorrect Concatenation Character
In the first line of the Visual C# code snippet on page 271, the ampersand (&quot;&&quot;) character is used incorrectly as the concatenation of the SQL command string. This should be the plus (&quot;+&quot;) character.

Change:

Cmd = &quot;DELETE = FROM Employees WHERE Name = '&quot; & aString & &quot;'&quot;; To:

Cmd = &quot;DELETE = FROM Employees WHERE Name = '&quot; + aString + &quot;'&quot;;

Page 282: DataSet should be DataTable
On page 282, in step 3 of the section To create a DataSet programmatically,

Change:

&quot;...Columns collection of the DataSet.&quot;

To:

&quot;...Columns collection of the DataTable&quot;

Page 283: DataSet should be DataTable
On page 283, in the third paragraph,

Change:

&quot;Next, you should add the appropriate number of columns to your DataSet.&quot;

To:

&quot;Next, you should add the appropriate number of columns to your DataTable.&quot;

Page 287: myDataRow Should Be myDataColumn
On page 287, under the section Unique Constraints there are three instances where the reference should be to DataColumn, not Data Row. In the first paragraph, and in the immediately following Visual Basic .NET and Visual C# examples of setting the property to true, the reference should be changed from Data Row to DataColumn.

In the first paragraph, change:

&quot;...set the Unique property of a DataRow to True (true)...&quot;

To:

&quot;...set the Unique property of a DataColumn to True (true)...&quot;

In the Visual Basic .NET example immediately following, change:

&quot;myDataRow.Unique = True&quot;

To:

&quot;myDataColumn.Unique = True&quot;

In the Visual C# example of this, change:

&quot;myDataRow.Unique = true;&quot;

To:

&quot;myDataColumn.Unique = true;&quot;

Page 293: Transaction Should Be Command
On page 293, in step 4,

Change:

&quot;Execute each transaction&quot;

To:

&quot;Execute each command&quot;

Page 320: ConnectionText should be CommandText
On page 320, in Table 6.7,

Change:

&quot;ConnectionText&quot;

To:

&quot;CommandText&quot;

Page 324: DataRelation Should Be Relation
On page 324, in steps 1 and 3 of the &quot;To add DataRelation objects to your schema using the XML Designer&quot; section, you are instructed to drag a DataRelation object. In the toolbox this object is referred to as a Relation object.

In step 1, change:

&quot;1. From the Toolbox, drag a DataRelation object...&quot;

To:

&quot;1. From the Toolbox, drag a Relation object...&quot;

In step 3, change:

&quot;3. Drag another DataRelation object...&quot;

To:

&quot;3. Drag another Relation object...&quot;

Page 327: Change To Visual C# Sample Code
On page 327, in the first Visual C# code sample below table 6.11, a line of code is repeated.

Change:

daOrders.Fill(objdsDoughnut);

daOrders.Fill(objdsDoughnut);

To:

daOrders.Fill(objdsDoughnut);

daItems.Fill(objdsDoughnut);

Page 356: Missing ) After (button)
On page 356, in the last Visual Basic.Net code sample,

Change:



To:



Page 420: Correction To Sample Visual Basic Code
On page 420, in the Visual Basic code sample, 12 lines from the top of page, change:

If Not (ItemCounter = lstOrders.Items.Count - 1) Then e.HasMorePages = True To: If Not (ItemCounter = lstOrders.Items.Count) Then e.HasMorePages = True

Page 462: Missing Dashes In Comment
On page 462, in step 5 for Visual C#, the first comment is not closed properly.

Change:

Page 505: Correction to Question 4 Answer
On page 505, in the answer for question 4,

Change:

&quot;You can set the tab order in Visual Studio by choosing Tab Index from the View Menu...&quot;

To:

&quot;You can set the tab order in Visual Studio by choosing Tab Order from the View Menu...&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: TKBOOK VC VSTUDIO VB 0-7356-1533-0 Stoecker

Keywords: kbinfo kbdocfix kbdocerr KB326875

-

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

© Microsoft Corporation. All rights reserved.