| | |
Help Using Selected Values between Tables
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
Hello everyone. I have a pretty straight foreward problem. Here is an overview of what i am trying to accomplish
1. I am trying to allow "teachers" of my quiz site to create a class list and in that class list, they can have a list of students. I created two tables, one called class list, and the other student list
2. On my page, I have two gridviews and two sql sources. the one sql source retreives the data from the class list table, and limits the results to a where statement based on a session object. The second sql data source grabs the data from the student list
3. I want the teacher to be able to click a class period from the table that is displaying the class list and have the student list data table display the list of students that are in that class period.
My problem: I restriced the sql source that is getting the student list to only show the data based on the selected value of the class list view. However, when i run the program, i get an error that says:
I think that this means i need to create a primary key. However, because multiple teachers are using the program, and each will have the same class period number, i cannot have the class period colum in my table be the primary key.
If this is kind of confusing, please let me know, and i will clarify. Thank you for all of your help!!! :p
1. I am trying to allow "teachers" of my quiz site to create a class list and in that class list, they can have a list of students. I created two tables, one called class list, and the other student list
2. On my page, I have two gridviews and two sql sources. the one sql source retreives the data from the class list table, and limits the results to a where statement based on a session object. The second sql data source grabs the data from the student list
3. I want the teacher to be able to click a class period from the table that is displaying the class list and have the student list data table display the list of students that are in that class period.
My problem: I restriced the sql source that is getting the student list to only show the data based on the selected value of the class list view. However, when i run the program, i get an error that says:
VB.NET Syntax (Toggle Plain Text)
Data keys must be specified on GridView 'classlistView' before the selected data keys can be retrieved. Use the DataKeyNames property to specify data keys.
I think that this means i need to create a primary key. However, because multiple teachers are using the program, and each will have the same class period number, i cannot have the class period colum in my table be the primary key.
If this is kind of confusing, please let me know, and i will clarify. Thank you for all of your help!!! :p
![]() |
Similar Threads
- getting values from drop down menu (JSP)
- collection_select with :selected option (Ruby)
- Maintain control Values after PostBack (ASP.NET)
- SELECT statement question (MySQL)
- Manipulating A Database (C#)
- Email Client, SMS, Voice command (Java)
Other Threads in the VB.NET Forum
- Previous Thread: Need a VB DLL to call from BCBuilder++
- Next Thread: my code doest work
| Thread Tools | Search this Thread |
"crystal .net .net2005 30minutes 2005 2008 access arithmetic array assignment basic binary bing box button buttons center check code combobox component connectionstring convert cpu crystalreport data database databasesearch datagrid datagridview design dissertation dissertations dissertationthesis dosconsolevb.net dropdownlist editvb.net excel file-dialog firewall folder ftp google hardcopy image images isnumericfuntioncall login math memory mobile ms mssqlbackend mysql navigate net networking opacity output peertopeervideostreaming picturebox1 port print printpreview problemwithinstallation project record reports" reuse save savedialog searchbox serial soap storedprocedure string tcp temp text textbox timer toolbox trim updown useraccounts usercontrol vb vb.net vb.netcode vb.nettoolboxvisualbasic2008sidebar vb2008 vbnet view vista visual visualbasic visualbasic.net visualstudio web wpf





