I am new to .Net and I am working on one task. Below is my scenario.
I have 2 tables:
-
Table 1: Students
StudentID StudentDetail 1 StudentName 2 StudentGrade -
Table 2: Student_data
StudentDetail StudentRecords StudentName John (Default) StudentName Jacob StudentName Smith StudentGrade A (default) StudentGrade B StudentGrade C
Question: When window form loads (run time) I need to display StudentRecords in combo box with StudentName = "John" and StudentGrade = "A" as default followed by other values.
StudentName and StudentRecords are in Labels and values are in a ComboBox.
I am using VB.Net and VS 2010 with SQL 2008r2.
I would appreciate any step by step help. Apologies If my request is simple.
I think you should think to start rethinking your data model. Some like this will be enough:
This way you can have:
Student
Grade
Anyway, this way you only can have a Grade per Student. So, it’s not much helpful. Something more complex is needed if you want to keep a track of the students grades for each subject and several tests per subject. Here you have another model a little more complex having that into account:
Again, you need to stop and think about your problem.