Thread: Listing 16-8
View Single Post
  #4 (permalink)  
Old October 23rd, 2006, 09:26 AM
jminatel's Avatar
jminatel jminatel is offline
Wrox Staff
Points: 18,940, Level: 59
Points: 18,940, Level: 59 Points: 18,940, Level: 59 Points: 18,940, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2003
Location: Indianapolis, IN, USA.
Posts: 1,945
Thanks: 73
Thanked 139 Times in 101 Posts
Default

smiller and ASP.NET:
I apologize for the mistakes in listing 16-8 and that they aren't listed on the errata page. Their omission from the errata page is my fault. Bill submitted this correction to me months ago, I've got it marked in my copy of the book, I just must have forgotten to get it posted on the page. I have submitted Bill's version of the correction as an errata and it will get posted. (His version of the fix is slightly different than yours). I'm also posting it here at the end of the message.

I would also like to say though, that while any error in a book is too many, I've yet to see the perfect error-free computer book from any publisher. I don't know of any major publisher that goes to greater lengths to give their readers the opportunity to publicly point out errors than we do here with these forums at Wrox.com or takes greater effort in posting errata when they are pointed out. We're also working to make the books better, but I also hope you can give us a little credit for the effort after the fact.

ASP.NET, I don't see that you've posted errata about any of the other 3 books in the box. Hopefully you are happier with them. As far as I know, they are fairly error free and what few errata that exist are on the errata pages for each. I like your site by the way!

Anyway, here's the corrections for 16-8:
chapter 16, page 593 code listing 16-8, VB code, lines 5-7 of code:
        Profile.FirstName = Firstname.Text
        Profile.LastName = Lastname.Text
        Profile.Age = Age.Text

should be:
        Dim pc As ProfileCommon = New ProfileCommon()
        pc.Initialize(CreateUserWizard1.UserName.ToString( ), True)

        pc.FirstName = Firstname.Text
        pc.LastName = Lastname.Text
        pc.Age = Age.Text

        pc.Save()

chapter 16, page 594 code listing 16-8, C# code, lines 5-7 of code:
        Profile.FirstName = Firstname.Text;
        Profile.LastName = Lastname.Text;
        Profile.Age = Age.Text;

should be:
        ProfileCommon pc = new ProfileCommon();
        pc.Initialize(CreateUserWizard1.UserName.ToString( ), true);

        pc.FirstName = Firstname.Text;
        pc.LastName = Lastname.Text;
        pc.Age = Age.Text;

        pc.Save();

page 594: first paragraph following the code, replace the first sentence with:
With this change to the standard registration process as is defined by a default instance of the CreateUserWizard control, your registration system now includes the request for properties stored and retrieved using the ProfileCommon object. Then, using the ProfileCommon.Initialize() method, you initialize the property values for the current user. Next, you set the property values using the strongly typed access to the profile properties available via the ProfileCommon object. After all the values have been set, you use the Save() method to finalize the process.

Jim Minatel
Senior Acquisitions Editor
Wiley Technology Publishing
WROX Press
Blog: http://wroxblog.typepad.com/
Jim's Book of the week: No book this week - Donate to the Red Cross!