Errata

Programming Microsoft® Visual Basic® .NET for Microsoft Access Databases

Errata for Programming Microsoft® Visual Basic® .NET for Microsoft Access Databases

The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted By Date submitted Date corrected
Printed
Page 61

Decimal Size in Bytes Should Be 16
On page 61, in Table 3-1, the Data Type "Decimal" should have a Size in Bytes of 16. It is incorrectly shown as 1.

Microsoft Press  Jul 13, 2010 
Printed
Page 159

Missing Lines
On page 159, in the code sample, two lines are missing.



Add the following two lines of code immediately before the line that reads "Return OrderTotal:



rst1.Close

cnn1.Close

Microsoft Press  Jul 13, 2010 
Printed
Page xix

Companion Content link is incorrect On page xix, the Companion Content link under "Installing and Using the Samples and Demo Files" does not function as intended. Change: http://www.microsoft.com/mspress/books/6370.asp To: http://www.microsoft.com/mspress/books/companion/6370.aspx

Microsoft Press  May 06, 2010 
Printed
Page 140

File Type Should Be .bmp In the last line of code shown on page 140 has the incorrect file type given. Change: "Office10SamplesEmpID" & str2 & ".eps" To: Office10SamplesEmpID" & str2 & ".bmp"

Microsoft Press  May 06, 2010 
Printed
Page 311

Code can generate exception in some cases On page 311, in some cases, clicking the Go To button on Form3 generates an exception. To correct this error, modify the code in the Button5_Click event handler as follows: Change:Private Sub Button5_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles Button5.Click 'Set pointer for new row value. Dim int1 = CInt(TextBox1.Text) - 1 'Go to designated row, and save row position or 'restore old row position. If int1 >= 0 And int1 <= DsOrderDetails1. _ Tables("Order Details").Rows.Count - 1 Then DataGrid1.CurrentRowIndex = int1 intOldRow = DataGrid1.CurrentRowIndex Else DataGrid1.CurrentRowIndex = intOldRow End If 'Compute text box display showing current row 'relative to total number of rows. UpdatePositionIndicator(DataGrid1) End Sub To:Private Sub Button5_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles Button5.Click 'Set pointer for new row value. Dim nSpace As Integer Dim sRange As String Dim sValue As String Dim nValue As Integer Dim int1 As Integer = 0 sRange = TextBox1.Text nSpace = sRange.IndexOf(" ") If nSpace > 0 Then sValue = sRange.Substring(0, nSpace) If IsNumeric(sValue) Then nValue = Integer.Parse(sValue) If nValue > 0 Then int1 = nValue - 1 End If End If End If 'Go to designated row, and save row position or 'restore old row position. If int1 >= 0 And int1 <= DsOrderDetails1. _ Tables("Order Details").Rows.Count - 1 Then DataGrid1.CurrentRowIndex = int1 intOldRow = DataGrid1.CurrentRowIndex Else DataGrid1.CurrentRowIndex = intOldRow End If 'Compute text box display showing current row 'relative to total number of rows. UpdatePositionIndicator(DataGrid1) End Sub 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.

Microsoft Press  May 06, 2010