Wrox Programmer Forums
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB 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 July 15th, 2012, 09:27 AM
Authorized User
Join Date: Jun 2012
Posts: 27
Thanks: 3
Thanked 0 Times in 0 Posts
Default Chapter 13 - Last Try it Out

I'm having an issue on Chapter 13, I successfully completed the "Managing Data with the DetailsView Control" Try it Out, I can insert and update entries in my database without any issues.

When I complete the last Try it Out, "Customizing the DetailsView and Handling Its Events", both insert and update stop working. I get no error messages after clicking "Insert" or "Update", but when I go check the entries, they aren't there.

I also checked the databases physically on Web Developer's Database Explorer, no content seems to be added to my database.

I've deleted the AddEditReview page and restarted the Try it Outs and it's always the same result, first Try it Out works fine, second Try it Out - no dice. I've gone as far as compare your source with mine, and I can't seem to find any difference. Except that when I run your exercise it works...

Any idea what this could be? Thank you for your time.
Old July 15th, 2012, 12:07 PM
Authorized User
Join Date: Jun 2012
Posts: 27
Thanks: 3
Thanked 0 Times in 0 Posts

After looking at this for hours, I decided to just change what I knew was different. Our database.

I remade the tables and it's now working, I still don't get why it wasn't before.

I messed a lot with the data inside the tables (eventually led to my first Review ID being 7 and my first Genre ID being 3), I'm not sure if this has something to do with not working, but "tidying" up my IDs seems to have worked...
Old July 16th, 2012, 04:45 AM
Imar's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts

Hi there,

The actual IDs shouldn't make a difference. But maybe you didn't create the necessary primary keys on the Id columns of the database or create a relationship between the two tables? Those are the two most common issues...


Imar Spaanjaars
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 13 Try It! MikersSU BOOK: Stephens' C# Programming with Visual Studio 2010 24-Hour Trainer 11 April 1st, 2012 05:14 AM
Chapter 13 thepianoguy BOOK: Professional iPhone and iPad Application Development 3 April 6th, 2011 09:42 AM
Chapter 13 rock1233 BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 3 October 6th, 2009 12:18 PM
Chapter 13 bwoll BOOK: Beginning Access 2003 VBA 1 June 7th, 2007 03:57 PM

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