andycharger
Well-known member
- Joined
- Apr 2, 2003
- Messages
- 152
HELP!
im in some trouble here....
Im trying to write a set of questions and answers from a database into a datagrid.
I have a list of questions and I want to select a random 10 from this list.
This is fine. I write the following
"Select top 10 * from QUESTIONS order by newid()"
This gives me 10 random questions. However, I now need the answers.
I need to build some form of loop to go through the answers table, pull out the matching answers and put them in a dataset or some similar way to hold data. I then need to bind this data to a datagrid so I can display it in asp.net.
Any idea as to how I will do this?
im in some trouble here....
Im trying to write a set of questions and answers from a database into a datagrid.
I have a list of questions and I want to select a random 10 from this list.
This is fine. I write the following
"Select top 10 * from QUESTIONS order by newid()"
This gives me 10 random questions. However, I now need the answers.
I need to build some form of loop to go through the answers table, pull out the matching answers and put them in a dataset or some similar way to hold data. I then need to bind this data to a datagrid so I can display it in asp.net.
Any idea as to how I will do this?