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 September 14th, 2008, 06:43 AM
Registered User
 
Join Date: Sep 2008
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Database diagrams (aka Queries)

Long term MS Access user here and I'm trying to replciate our Access Database within ASP3.5 so it can be viewed over the web. However I'm having problems creating my first query!

Essentially I have two tables:

Make_Table
MakeID
Make

Model_Table
ModelID
MakeID
Model

I want to display many different Models for when the user selects a Make.
I'v dragged across from MakeID in the first table, to MakeID in the second table (to create a link), but no joy whatsoever :(

This is the error message I'm getting:

/*
   14 September 200812:36:59
   User:
   Server: .\SQLEXPRESS
   Database:
   Application:
*/

'Make' table saved successfully
'Model' table
- Unable to create relationship 'FK_Model_Make'.
The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_Model_Make". The conflict occurred in database "I:\ASP\SOLIDAUTO\APP_DATA\CATALOGUE.MDF", table "dbo.Make", column 'MakeID'.



 
Old September 14th, 2008, 07:06 AM
Registered User
 
Join Date: Sep 2008
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Managed to suss this! Basically, what it was saying was I had a value in one table that was trying to call information up in another...that wasn't there.

So a value in 'Model' was trying to call up 'MakeID=1' but that wasn't there.






Similar Threads
Thread Thread Starter Forum Replies Last Post
newbie...database queries.. Deepa7476 Visual Basic 2005 Basics 2 June 16th, 2006 12:41 AM
Database Queries frosty ASP.NET 2.0 Basics 3 May 13th, 2006 06:20 PM
C# database, diagrams StreetSweaper C# 1 December 25th, 2003 06:15 AM





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