Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 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 8th, 2009, 11:26 AM
Authorized User
 
Join Date: Mar 2009
Posts: 64
Thanks: 0
Thanked 1 Time in 1 Post
Default SQL Error, p. 456, step 16

I can view NewPhotoAlbum.aspx in the browser. I enter a name and click "Insert" and that works. But when I put data in the Description, Tooltip and ImageUrl text boxes of ManagePhotoAlbum.aspx and click Insert I get:

Code:
 Server Error in '/BookWebSite' Application.

                 The INSERT statement conflicted with the FOREIGN KEY constraint "FK_Picture_PhotoAlbum". The conflict occurred in database "C:\DOCUMENTS AND SETTINGS\THOMAS\MY DOCUMENTS\VISUAL STUDIO 2008\WEBSITES\BEGASPNET\BOOKWEBSITE\APP_DATA\PLANETWROX.MDF", table "dbo.PhotoAlbum", column 'Id'.
The statement has been terminated.
In trying to figure this out I looked at the database. The PhotoAlbum table is getting the new name from NewPhotoAlbum.aspx. There is no data in the Picture table, but I can add the data to the Picture table manually that would have been put in place by adding it through the ManagePhotoAlbum.aspx page.

I am still working on it. If you have any thoughts, please let me know.

Thanks.

Thomas
 
Old April 8th, 2009, 11:54 AM
Authorized User
 
Join Date: Mar 2009
Posts: 64
Thanks: 0
Thanked 1 Time in 1 Post
Default

Dang, never mind.

I misspelled ManagePhotoAlbum.aspx?PhotoAlbumId by leaving out the second 'o'. Makes a big difference.

BTW, I used the debugging feature and had to allow a change to web.config.

Has the book mentioned that as yet?

Thomas
 
Old April 8th, 2009, 01:19 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Yes, it it. Take a look at page 608, step 3...

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!





Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL Error, p. 412, step 11 member4953 BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 3 April 6th, 2009 03:11 PM
Chapter 16 Try It Out Page 498 Step 7 workib BOOK: Beginning Microsoft Visual C# 2008 ISBN: 978-0-470-19135-4 1 October 9th, 2008 08:22 PM
Chapter 16 Sql connection error flashmanTom BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 1 May 22nd, 2008 05:04 PM
Chapter 16 forum - SQL error petefernando PHP Databases 3 October 22nd, 2007 07:13 PM
Chapter 16 forum - SQL error petefernando Beginning PHP 2 March 31st, 2006 01:23 AM





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