Microsoft Visual Basic 2013 Step by Step

Errata for Microsoft Visual Basic 2013 Step by Step

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
Safari Books Online
Chapter 10
Interactive Math Game Code

I'm using the Safari Online book, so I don't know the page number, but it is in Chapter 10, the code for the Interactive Math Game "Find a Number" has an error in the third line. The word I'm is misspelled as I"m. The " should be a '. It is a minor error, but it keeps the code from running. Console.WriteLine("I"m thinking of a number from 1 through 100.") Thanks, Ed

Note from the Author or Editor:
Dear Ed-- This does sound like a minor error-- if you are seeing the double quote (") in I'm instead of single (') than that would be a problem. I have checked the printed book and the sample files that are available for download, and they don't have this particular error. I don't have the O'Reilly Safari online book before me, so I can't verify that, but you are obviously seeing it. And I thank you for reporting it. If anyone else sees this problem, please use a single quote (') in the source code, and that will fix the problem. Again, it seems to only be in the O'Reilly Safari Online book, but I can't verify that. I'm not sure why that would be, as it should be the final printed files. All the best, Michael Halvorson

Ed  Jan 10, 2014 
Page 67

The generator instance's Next method in each line creates a random number between 0 and 9ójust what you need for this particular slot machine application. FirstNum.Text = generator.Next(0, 9) This may produce a 0, but never a 9 Next(0,10) would fix it, but really a MS bug if their doc is correct

Note from the Author or Editor:
The reader is absolutely correct: The code on page 67 should be: FirstNum.Text = generator.Next(0, 10) SecondNum.Text = generator.Next(0, 10) ThirdNum.Text = generator.Next(0, 10) This will produce the expected result of a random number in the range 0 to 9. This is explained more fully (and correctly) in Chapter 10; see esp. page 277 where the range of random numbers and their applications are discussed. What to fix------ The following pages have this error and need errata corrections in the pattern shown above: Page 65 (bold code that needs changing) Page 66 (screen shot) Page 67 (code that needs changing) Pages 101-102 (bold code that needs changing) The pattern of the code fix is always the same. Note that the current code and sample files do not produce compilation errors. This is a "logic error" or unexpected result--random numbers in the range 0...8 are generated. However, the example works best when a number in the range 0...9 is produced.

Bryson Powell  Feb 21, 2014 
Page 356
United States

I have Access 2013 installed but the "Test Connection button yields the error message as though Access were not installed. What do I do now??

Note from the Author or Editor:
I have not experienced this error-- With Access installed you should have a valid Test Connection button. However, I have occasionally seen connectivity issues between Office apps and Visual Studio. These are very large product installs with many files and sometimes there is a missing link of some sort. The answer to "What do I do now?" is that you continue on with the database connection and see if it works when you run the program. If you recently installed Access 2013, you would need to reboot your system--and you should also verify that Access 2013 is working properly. i.e. can you open and examine the sample Access file I've provided or other files. Microsoft may also have some advice about this on Microsoft Office or Visual Studio 2013 forums. However, I have not seen this particular error yet.

Mark E Deardorff  Feb 11, 2014