AllanJohnson
New member
- Joined
- May 9, 2012
- Messages
- 1
- Programming Experience
- Beginner
I have a 2 table in my database. Lets call it tblStudents and tblCourse. In my tblStudents I have field names with StudentID, StudentName, StudentGender, and at my tblCourse I have StudentID, StudentCourse, StudentYear and StudentNumber. I have a windows form which is I need to display all info of a certain student. this is working perfectly
but, I need to display the course and year of a certain student too. The problem is I don't know how to select multiple tables. Any help would be appreciated. Thanks in advance. God Bless
C#:
[COLOR=#000000][FONT=inherit]strSelect2 [/FONT][/COLOR][COLOR=#666600][FONT=inherit]=[/FONT][/COLOR][COLOR=#666600][FONT=inherit]([/FONT][/COLOR][COLOR=#008800][FONT=inherit]"select * from tblStudents where StudentID = @id"[/FONT][/COLOR][COLOR=#666600][FONT=inherit]);[/FONT][/COLOR]