1013 - Mastering Microsoft Visual Basic 6
 Development

  Home

Errors in Course 1013

Chapter 1, lab 1: Visual Basic Essentials

Exercise/Procedure/Step Error/Suggested Change
Exercise 1: Creating Forms and Menus | Create the Main Form | Step 6. The menu described in the printed documentation is incorrect--it refers to the Purchase menu. The online lab instructions use the correct menu name--it refers to the Account menu.

Chapter 4, lab 4.2: Binding an ActiveX Control

Exercise/Procedure/Step Error/Suggested Change
Add a Command to the Data Environment (if using SQL Server) The SQL text provided for the ClassesPerStudent command is incorrect. The FROM clause should use the Enrollment table, not the Classes table. Completed SQL text should read: SELECT Enrollment.StudentID, Classes.Title AS ClassName, Books.Title AS BookName, Books.Price FROM Enrollment INNER JOIN Students ON Enrollment.StudentID = Students.StudentID INNER JOIN Books ON Classes.BookID = Books.BookID INNER JOIN Classes ON Enrollment.ClassID = Classes.ClassID WHERE Enrollment.StudentID = ?
Add a Command to the Data Environment (if using Access) The SQL text provided for the ClassesPerStudent command is incorrect. The FROM clause should use the Enrollment table, not the Classes table. Completed SQL text should read: SELECT Enrollment.StudentID, Classes.Title AS ClassName, Books.Title AS BookName, Books.Price FROM Enrollment, Students, Classes, Books WHERE Enrollment.StudentID = Students.StudentID AND Enrollment.ClassID = Classes.ClassID AND Classes.BookID = Books.BookID AND (Enrollment.StudentID = ?)

Chapter 10, Self-check questions

Exercise/Procedure/Step Error/Suggested Change
Question 5 The Correct answer is A. The Answer should read:
 Welcome.WriteTemplate

Chapter 6, Advanced Data Access Issues

Exercise/Procedure/Step Error/Suggested Change
Enforcing Data Integrity | Handling Referential Integrity Errors The sample code in this topic contains an error. The variable errStateU is meant to represent a specific ADO Error object and therefore shouldn't be declared "As Errors" but rather: Dim errStateU As ADODB.Error When an error occurs, the ADO Errors collection should be interrogated. In this case, when we have a referential integrity error. The error handler code should read:
 If Err.Number = -2147217900 Then
     
     ' show the database errors
     For Each errStateU In cnStateUBookstore.Errors
         MsgBox "Database Error: " & _
                 errStateU.Number & " " & _
                 errStateU.Description
     Next
 
     ' the transaction will be rolled back
     cnStateUBookstore.RollbackTrans
 End If

Chapter 10, Building Internet Applications

Exercise/Procedure/Step Error/Suggested Change
Chapter Objectives The objective: "Package an ActiveX Control for use on a Web site" is covered in Chapter 9, not Chapter 10.