View Single Post
  #8 (permalink)  
Old January 25th, 2009, 01:58 PM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi again,

Take a look at the database and the diagram you created. The relation between PhotoAlbum and Picture is incorrect. You related PhotoAlbum.Id to Picture.Id. This means that the new Id of a Picture must exist in the PhotoAlbum table... ;-)

Instead, drop and then recreate the relationship between PhotoAlbum.Id and Picture.PhotoAlbumId....

Hope this helps,

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!