Errata

Introducing Microsoft WebMatrix

Errata for Introducing Microsoft WebMatrix

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

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

Version Location Description Submitted by Date submitted
Printed Page xviii
bottom: Code Samples

The code sample link (http://go.microsoft.com/FWlink/?Linkid=217894) is not found. Can you provide a correct link please?

Jason  Jun 06, 2011 
Printed Page xviii
Last : code samples

This link:
http://go.microsoft.com/FWlink/?Linkid=217894
is not working at all. It's not been found on the net. Please provide as soon as possible a working one.

HEROLD JEANPOIS  Jun 09, 2011 
Printed Page 120
Script example

In the script for capturing form input on page 120, the variable for capturing the last name has not been declared in the Razor script.
It is also not listed in the body under the "You entered" section, even though it is specified in the form input fields.

chris jackman  Jun 18, 2011 
Printed Page 132
code

I got this message bellow when I tried to run the input file; can you help me please understand what it is since I'm a begginer in that field.

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0103: The name 'db' does not exist in the current context

Source Error:


Line 6: if(IsPost){
Line 7: var insertQ ="INSERT INTO TwitterFriends (FirstName, LastName, TwitterID) VALUES (@0, @1, @2)";
Line 8: db.Execute(insertQ, firstName, lastName, twitterID);
Line 9: Response.Redirect(@Href("~/index.cshtml"));
Line 10: }

Source File: 7-1\input.cshtml Line: 8

hjp  Jul 01, 2011 
Printed Page 134
Step 1, first sentence

The first sentence of Step 1 currently mentions the file name "input.cshtml" but it should instead mention the file name "index.cshtml".

Matthew Danda  Jun 11, 2011 
Printed Page 136
Code sample in Step 5

The code "7-1.sdf" should read "7.1" without the ".sdf".

Matthew Danda  Jun 11, 2011 
Printed Page 136-137
Code

Why when I run the index.cshtml I can't have the same result as in figure 7-12? Mine comes out blank? Can I have an explaination?

Regards

hjp  Jul 09, 2011 
Printed Page 138-139
codes

var db = Database.Open("7-1"); instead var db = Database.OpenFile("7-1"); and somewhere, it should have been said to put this:(
var updateQ = "UPDATE TwitterFriends SET FirstName=@0, LastName=@1, TwitterID=@2 WHERE id=@3";) on one line to avoid any error message.

hjp  Jul 09, 2011 
Printed Page 139
Code sample, updateQ variable declaration

The SQL statement in the updateQ variable declaration should capitalize "Where" so that it reads "WHERE"

Matthew Danda  Jun 11, 2011 
Printed Page 144
Code and alternative

I think it would be really awesome if the (edit.cshtml) file had code that allow real sorting for if the db is a large one. Or if I want to target names beginning with certains letters, wha do I do?

hjp  Jul 10, 2011 
Printed Page 167
Code example

In the code you find:
if (eMailSubject==null) {}
This raises an error. It should be: if (eMailSubject.IsEmpty()){}
The same for the other examples on the page.

Anonymous  Aug 14, 2011 
Printed Page 201
Step 2

In Step #2 in "Adding Data to the Database," it is unclear what actions the reader is supposed to perform. The directions are to "Open the database, and then call the Execute method on the database...." However, this seems more like a description of what the code is doing, rather than an instruction for the user to perform. Fortunately, if you skip this step, you can still complete the procedure successfully.

Matthew Danda  Jun 18, 2011 
Printed Page 205
Code samples, SQLUPDATE variable declaration

In the "var SQLSELECT" statement, some of the words should have the case inverted. Instead of "where ID=@0" it should read "WHERE id=@0"

Matthew Danda  Jun 18, 2011