Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > BOOK: Beginning ASP.NET 4 : in C# and VB
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old July 15th, 2012, 10:27 AM
Authorized User
Points: 113, Level: 2
Points: 113, Level: 2 Points: 113, Level: 2 Points: 113, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.
Reply With Quote
  #2 (permalink)  
Old July 15th, 2012, 01:07 PM
Authorized User
Points: 113, Level: 2
Points: 113, Level: 2 Points: 113, Level: 2 Points: 113, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2012
Posts: 27
Thanks: 3
Thanked 0 Times in 0 Posts
Default

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...
Reply With Quote
  #3 (permalink)  
Old July 16th, 2012, 05:45 AM
Imar's Avatar
Wrox Author
Points: 71,164, Level: 100
Points: 71,164, Level: 100 Points: 71,164, Level: 100 Points: 71,164, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,960
Thanks: 79
Thanked 1,559 Times in 1,536 Posts
Default

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...

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
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!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 06:14 AM
Chapter 13 thepianoguy BOOK: Professional iPhone and iPad Application Development 3 April 6th, 2011 10: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 01:18 PM
Chapter 13 bwoll BOOK: Beginning Access 2003 VBA 1 June 7th, 2007 04:57 PM



All times are GMT -4. The time now is 11:25 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.