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 25th, 2012, 09:38 AM
Registered User
 
Join Date: May 2012
Posts: 8
Thanks: 1
Thanked 0 Times in 0 Posts
Question Chapter 14: insert statement conflicted...

Hey,

In the try it out when I open up the page ManagePhotoAlbum.aspx and fill in the details, choose an image and click insert I get the following error:

http://i.imgur.com/jSA9b.jpg

I copied the managephotoalbum & it's code behind + the database files from the source that is provided, and I get the same error.

I don't think it's a permission error as, even though it gives an error, the image ends up in the /gigpics folder.

Any ideas?

Thanks,
 
Old July 25th, 2012, 09:41 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

This can happen when your database columns aren't setup or linked correctly. Did you link Picture.PhotoAlbumId and PhotoAlbum.Id?

Also, are you forwarding the correct photoalbum ID from the new album page to the manage album page? Is the name of the query string field the same in both pages?

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!
 
Old July 25th, 2012, 10:17 AM
Registered User
 
Join Date: May 2012
Posts: 8
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Problem solved, I misread. I was opening up managephotalbum and it should've been newphotoalbum like it says in the book :)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert statement? Phil Critchley ASP.NET 4 General Discussion 1 May 5th, 2011 02:53 AM
Insert statement Banishah ASP.NET 3.5 Basics 1 August 9th, 2009 01:51 PM
Complicated Insert Statement jackie25 SQL Server ASP 1 May 31st, 2006 09:08 AM
Insert Statement Iashia06 Access 0 April 7th, 2006 12:45 PM





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