954,500 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

updating for many to many relaitonship

Hi,

hopefully this is the right place to post this.
Whats the best way to handle a many to many relationship in a windows form?

The relationsip involves a student having multiple courses and vice verca. However each student would be viewed individually and it would just need to list the courses they were associated with and update, insert etc.

I hope thats not entirely vague..!

Thanks in advance

jlivvers
Light Poster
26 posts since Oct 2010
Reputation Points: 10
Solved Threads: 0
 

select * from tbl_student_courses where studentID = myID

insert into tbl_student_courses values (@myID,@otherdata)

update tbl_student_courses set (otherdata=@myOtherdata) where studentID = myID

Hard to tell how to help you since you didn't give us your database schema. These are some standard, non-specific examples that hopefully you may learn from.

skatamatic
Posting Shark
959 posts since Nov 2007
Reputation Points: 403
Solved Threads: 129
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: