Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 2.0 and Databases
This is the forum to discuss the Wrox book Beginning ASP.NET 2.0 and Databases by John Kauffman, Bradley Millington; ISBN: 9780471781349
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 2.0 and Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 13th, 2006, 03:37 PM
Authorized User
 
Join Date: Aug 2006
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default TIO-0903-TextBoxWithLIKE

In the exercise TIO-0903-TextBoxWithLIKE you state in bullet 2 “.., select WHERE and set the column to au_lname. But for the operator, select LIKE. The source will control named TextBox1.”

SelectCommand="SELECT [au_id], [au_lname], [au_fname], [city], [state] FROM [authors]
WHERE ([au_lname] LIKE '%' + @au_lname + '%')">
            <SelectParameters>
                <asp:ControlParameter
                    ControlID="TextBox1"
                    DefaultValue="CA"
                    Name="au_lname"
                    PropertyName="Text"
                    Type="String" />
            </SelectParameters>

But in “your code should be similar to the following”

WHERE ([State] LIKE ‘%’ + @state + ‘%’)”>
            <SelectParameters>
                <asp:ControlParameter
                    ControlID="TextBox1"
                    DefaultValue="CA"
                    Name="State"
                    PropertyName="Text"
                    Type="String" />
            </SelectParameters>

So should one have used set the column to state?


 
Old November 1st, 2006, 04:11 PM
Registered User
 
Join Date: Sep 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

That was my assumption, yes. When I gave this to my students, I told them that the first description under instruction #2 (bottom of page 223) was in error, and that the second sentence should read "When you go through the Configure Data Source Wizard, select WHERE, and set the column to state". (Instead of setting the column to au_lname.)







Similar Threads
Thread Thread Starter Forum Replies Last Post
Ch8 - TIO#4 (Other List Controls) jecii BOOK: Beginning ASP.NET 2.0 and Databases 0 December 7th, 2007 07:57 PM
TIO-1604-SqlCacheInvalidation problem [email protected] BOOK: Beginning ASP.NET 2.0 and Databases 3 October 23rd, 2006 10:22 AM
TIO-0904-DropDownList tbroom BOOK: Beginning ASP.NET 2.0 and Databases 0 October 13th, 2006 05:00 PM
WOW--TIO-0905 VERY confusing rsearing BOOK: Beginning ASP.NET 2.0 and Databases 9 October 12th, 2006 12:36 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.