Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > BOOK: Beginning ASP.NET 4 : in C# and VB
|
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 October 4th, 2011, 11:27 AM
Authorized User
 
Join Date: Sep 2011
Posts: 37
Thanks: 13
Thanked 0 Times in 0 Posts
Send a message via MSN to SamuelMSr
Default

As far as those username passwords go, this site will be coming down and those databases will be deleted in a couple days anywyas. It was just more that I wanted to publish all of this and make it functional, and show my dad (who is paying for all my learning materials) that I am for sure learning. :)

Thanks again for everything!
__________________
Noob, whole noob, nothing but a noob, so help me God. I will learn if it kills me.....
 
Old October 12th, 2011, 10:06 AM
Authorized User
 
Join Date: Sep 2011
Posts: 41
Thanks: 3
Thanked 4 Times in 3 Posts
Default Database Relationship

Sam or anyone else,

FYI: I'm trying to set up a photo album project "live", similar to the one in chapter 14. I set up two tables on the SQL Server on Godaddy.com: Album and Picture.

QUESTIONS: Has anyone set up tables and relationships on a live server? If so, how did you manage to set up the table relationship as depicted on page 498?

1) I am unable to use the Database Diagram in VWD nor SQL Server Mgmt Studio. Both places, I get the message "... A member of the db_owner role must use the database diagramming functionality ... "

2) Therefore, I try to use the SQL Server Web Admin provided by Godaddy. But when I try to setup the relationship it doesn't accept it as follows:
- click Album table
- click New relationships
- choose Picture as Foreign Key table
- choose Id (primary key on Album table) and AlbumId (foreign key on Picture table)
- click Create

>>> Error message: There are no primary or candidate keys in the ref table 'dbo.Picture' that match the referencing column list on the foreign key 'FK_Picture_Album". ... "

3) However, when I try to set up the relationship in reverse order, select any column from the Album table and choose the Id (primary key on the Foreign table Picture), it allows the relationship to be set up. But this doesn't seem correct. It's like (using the example on page 498), connecting the Id on Album to Id on Pictures. We don't want this, we want Id on Album to connect to PhotoAlbumId on Pictures.

CONCLUSION: I probably spent nearly two hours on this particular point because it seems backward. After further research, I am now pretty convinced that the Primary Key table and Foreign Key table are presented backwards in the Relationships section. I confirmed that the relationship holds its referential integrity based on what I expected by trying to delete items from each table. Based on this, it seems "incredible", but the PK and FK tables are listed backwards on the Godaddy SQL Server Web Admin.

I wrote this for two reasons: Maybe someone can correct me (but I can't see where) ... also, perhaps it'll save someone else some time and hair wrangling if in this same situation ... good luck.
 
Old October 12th, 2011, 10:59 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

For hosts like GoDaddy which make it so hard to manage your database, takea look at the Database Publishing wizaad. It enables you to script your database on your development machine and then run the script at the remote server. Chapter 19 provides more information.

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!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Uploading video files on to my site palvin Classic ASP Components 1 September 29th, 2011 06:39 AM
Uploading files to hosting site. tankeros BOOK: Beginning ASP.NET 4 : in C# and VB 1 November 10th, 2010 02:51 AM
Uploading video files on to my site palvin Classic ASP Professional 0 March 1st, 2006 11:13 AM
UPLOADING SQL DATABASE aspnet79434319 Classic ASP Basics 1 June 27th, 2005 08:41 AM
uploading site aspnet79434319 Classic ASP Basics 1 June 25th, 2005 11:22 PM





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