-
Dec 26th, 2012, 07:24 PM
#1
[RESOLVED] Creating relationships between tables in Visual Studios
Hi,
I am currently creating my own portfolio website after a long time of putting it aside. I am using one of my old website from school as a template! Which, has everything I need except when it comes to reconnecting the table relationships after re-design the table in Visual Studio 2010 I have tried both selecting the primary key in the first table and dragging it to the target field in the target table and also the target to the primary key but the relationship between the tables isn't drawn.
How do I drawn the relationships between tables in VS 2010?
Thanks,
Nightwalker
Last edited by Nightwalker83; Dec 31st, 2012 at 08:29 AM.
Reason: Fixed spelling!
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Dec 28th, 2012, 04:47 AM
#2
Re: Creating relationships between tables in Visual Studios
Thread moved to the 'Database Development' forum
-
Dec 28th, 2012, 08:54 AM
#3
Hyperactive Member
Re: Creating relationships between tables in Visual Studios
I've never done this in Visual Studio before. What RDBMS are you using? Oracle, MySQL, and MS SQL (as well as Access) all allow you to create diagrams of your tables. In Visual Studio 2005, you can create these diagrams by opening the project and make sure the Server Explorer is open as well. Assuming the database is attached to the project (if it's not, you can create these diagrams in whatever RDBMS you're using), expand the database node. You will see several folders (Tables, Views, etc). Expand the "Database Diagram" node. If you haven't created a diagram yet, you will be prompted to do so. From there you should be able to add your FK and other relationships. An remember, even if you can visually draw the lines between tables, they are really just visual representations of your relationships and can be created in the table DDL sql.
Let me know if this helps or if you need more assistance.
jason
if i was able to help, rate my post!
-
Dec 28th, 2012, 05:37 PM
#4
Re: Creating relationships between tables in Visual Studios
Hi Jason,
In this case I'm using SQL Server Database "*.mdb". I have did this years ago but I have forgotten what I did. Thanks, I will see if the above solution helps me in connecting the tables, of which, I only have two at the moment.
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Dec 28th, 2012, 10:59 PM
#5
Re: Creating relationships between tables in Visual Studios
Open dataset in VS designer-->Right click on the DataTable and select option "Add Relation"
__________________
Rate the posts that helped you
-
Dec 31st, 2012, 08:25 AM
#6
Re: Creating relationships between tables in Visual Studios
Silly me! All I had to do was draw the tables in the "Database Diagram" (making sure the Foreign/Primary Keys were both of the same type) then click the appropriate field in one table and drag it to the matching field in the other table.
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|