Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8
This is the forum to discuss the Wrox book Beginning ASP.NET 2.0 by Chris Hart, John Kauffman, David Sussman, Chris Ullman; ISBN: 9780764588501
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 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 April 27th, 2007, 12:26 AM
Registered User
 
Join Date: Feb 2007
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to condescendent Send a message via Yahoo to condescendent
Default Big Bug on Page327, Chapter9

In the low part of this page, the code as following:

While rdr.Read()
goalsFor += Convert.ToInt32(rdr("GoalsFor"))
goalsAgainst += Convert.ToInt32(rdr("GoalsAgainst"))


If goalsFor > goalsAgainst Then
  wins += 1
ElseIF goalsFor < goalsAgainst Then
  losses +=1
Else
  draws +=1
End If

End While

Since goalsFor and goalsAgainst are used to save accumulated scores, how can they be used in comparing every game's win/loss result????

In the first run, the two variables will be 1, 6 accoring to the database, because it is the first record in the database and the initiate value of these two values are zero, it can be used to compare result, but from the second loop, they have the values from the last round, how can you use them to decide the result of the game???

After all, I know the reason why Wrox team is always lossing, that's because the author wants it lose.

I am a database programmer and .Net programmer
 
Old April 27th, 2007, 12:33 AM
Registered User
 
Join Date: Feb 2007
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to condescendent Send a message via Yahoo to condescendent
Default

I use VB in this example.

I am a database programmer and .Net programmer
 
Old April 30th, 2007, 04:53 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 105
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to DanM
Default

Hi Condescendent,

You're right - it is a deliberate logic bug as admitted to in this thread - http://p2p.wrox.com/topic.asp?TOPIC_ID=48970. There's also a way to 'fix' the code for this page so WroxUnited are more successful and a second note about an extra row in the database you should be aware of in that thread.

Thanks, Dan

Dan Maharry
Read the feed at http://feeds.feedburner.com/dansarchive





Similar Threads
Thread Thread Starter Forum Replies Last Post
How big is too big? chroniclemaster1 XML 5 September 17th, 2012 01:07 AM
chapter9, 295. pas BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 5 October 1st, 2008 04:55 AM
a big bug on a code busteronline ASP.NET 1.0 and 1.1 Basics 0 September 15th, 2008 09:11 AM
Bug or no to bug learning C using VS.Net to compil tesh All Other Wrox Books 0 February 14th, 2007 01:06 PM
Exception in chapter9 james.zeng BOOK: Beginning Cryptography with Java 2 January 11th, 2007 04:06 PM





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