Wrox Programmer Forums
|
BOOK: Wrox's Visual Basic 2005 Express Edition Starter Kit ISBN: 978-0-7645-9573-8
This is the forum to discuss the Wrox book Wrox's Visual Basic 2005 Express Edition Starter Kit by Andrew Parsons; ISBN: 9780764595738
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Wrox's Visual Basic 2005 Express Edition Starter Kit ISBN: 978-0-7645-9573-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 March 6th, 2008, 03:20 PM
Registered User
 
Join Date: Mar 2008
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 7 Again, second try out

It only happens to me or everyone else has the problem with the format of the names displayed on the list box?
I understand that the nchar(35) means to the database that, no matter what you enter, it will return 35 chars anyway, so it fills out the strings with blank spaces. As result, my DisplayName looks terrible.

I know a couple of gizmos that could be defined at the Person class properties to get rid of the extra blanks, but I was hoping there is a more direct and less painful way to do it.

Any ideas for this??

 
Old March 7th, 2008, 12:17 PM
Registered User
 
Join Date: Mar 2008
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Again, I am answering to myself on this one.
It looks like the author forgot to add the ToText.Trim functions on the DisplayName property of the Person class.
If instead of

Return FirstName + " " + LastName you type

Return FirstName.ToString.Trim + " " + LastName.ToString.Trim

everything works as displayed on figure 7-8.

So if you got lost on this one as well, you're not alone.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 2 - End of chapter exercises whizzkid1892 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 July 30th, 2008 12:02 PM
chapter 7 - chapter 11 pelopito BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 3 January 6th, 2008 11:40 AM
Generics chapter 12 difficult chapter i found ...? Larryz C# 2005 1 July 4th, 2007 09:40 PM





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