Wrox Programmer Forums
|
BOOK: Wrox's SQL Server 2005 Express Edition Starter Kit ISBN: 978-0-7645-8923-2
This is the forum to discuss the Wrox book Wrox's SQL Server 2005 Express Edition Starter Kit by Rajesh George, Lance Delano; ISBN: 9780764589232
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Wrox's SQL Server 2005 Express Edition Starter Kit ISBN: 978-0-7645-8923-2 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 June 17th, 2006, 05:30 PM
Registered User
 
Join Date: Jun 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Page 72: Navigation not responding


Regarding the page 72 Try It Out. After completing this Try It Out and entering the primary key values suggested in step 10, I do get messages indicating the correct Person. However, the program is stuck on the Jefferson record and does not navigate to any other. What am I missing in the implementation?

 
Old July 11th, 2006, 09:19 AM
Registered User
 
Join Date: Jul 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I ran into the same problem.

Hard to believe the Rows.Find does not tell the binding source to change to the newly found record?

I couldn't find anything on the Find but I did manage to scrounge this method which works.

Add this line after the
MessageBox.Show(CType(Rowlocated(1), String)) line:

Me.PersonBindingSource.Position = _
   Me.PersonBindingSource.Find("PersonID", _
   CType(pkvalue, Integer))



Note: That's all in one line. I used the underscore line continuation to break it.

That line will position the Binding Source to the record that is found by matching the "PersonID" column name (or property) with the value in pkvalue.

Oddly enough, this will work for any Column Name too.

Me.PersonBindingSource.Position = _
  Me.PersonBindingSource.Find("City", "Chicago")

Insert this line and the Binding Source position will be changed to the first record with the City name of Chicago.

I still think the FIND method is supposed to position the binding source to the "FOUND" record though.

It may be another one of those "quirks" of VB 2005 like the "Copy If Newer" table adapter update problem.

I'm still looking to see what I can "Find"!
 
Old July 23rd, 2006, 03:44 PM
Registered User
 
Join Date: Jul 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi FinFinatic,

Your posting was a big help. I spent several hours trying a variety of ways to position the record. I tried your solution and it worked.

My guess is that this doesn't have to be so difficult. I think what I need is a book that describes the methods from the following objects and how to use them together:

TableAdapter
DataSet
BindingSource
DataView
QueryBuilder

Your solution is a good example, using a DataSet method to get the record number and a BindingSource method to position the record.

If you find a good book, please post or you can send me e-mail at [email protected].

Thanks
Charles
 
Old July 23rd, 2006, 06:41 PM
Registered User
 
Join Date: Jun 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Very nice fix, FinFanatic. Much appreciated!

 
Old July 24th, 2006, 10:39 AM
Registered User
 
Join Date: Jul 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Leon,

Here's a site that I have found to be a big help.

http://www.asp.net/QuickStart/howto/...ataFromDB.aspx

Don't forget the DataRow among the things you need to look at. Adding, Updating, and Deleting can be accomplished through the DataRow. See the examples in the site link above.

I've moved on from this book to some project(s) more relevant to my own programming needs, and I've found that just about any question you have can be answered by persistent searching on the web.

It's nice to have some good examples to fall back on occasionally, so I'm still in the market for a good SQL-VB-Database book myself.

Baseman: Thanx. Nothing more frustrating than an example that is supposed to work, but doesn't IMO.
 
Old November 19th, 2006, 09:12 AM
Registered User
 
Join Date: Nov 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks FinFanatíc!

This was of great help.

Here is an interesting link for DataGridView:
http://forums.microsoft.com/MSDN/Sho...52467&SiteID=1

Sten-Gunnar






Similar Threads
Thread Thread Starter Forum Replies Last Post
page with navigation bar problem zouky ASP.NET 1.0 and 1.1 Basics 0 October 21st, 2004 03:03 AM
Page Navigation Formatting pvasudevan Crystal Reports 2 October 19th, 2004 11:02 AM
Page Navigation surendran PHP How-To 1 August 2nd, 2004 12:57 PM
page navigation nusrati PHP Databases 3 July 9th, 2004 09:08 AM
Page 72 - Table Cell Grows too Large Bob Bedell Dreamweaver (all versions) 5 July 20th, 2003 10:07 PM





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