How Do I? - Access Database via Visual Studio 2005

  • Thread starter Thread starter samadams_2006
  • Start date Start date
S

samadams_2006

Hello,

I have the following scenario and I was hoping that someone would help
me determine the best way to approach this situation in Visual Studio
2005:

1) I have questions in a database which I would like to display on a
form.
2) Along with the questions, I would like to display a series of
radio controls for the user to supply their input.
3) At the end of these series of questions and radio boxes, I would
like to display a command button. When the user clicks on this
command button, the database will be queried and the answers to the
questions will be displayed.

For example, the form would say:

------------------------------------------------------------------------------------------------------------------------
What is your favorite type of dog?
<radio1> Beagle <radio2> Great Dane <radio3> Greyhound
<radio4> Other

What is your favorite type of cat?
<radio1> Siamese <radio2> Persian <radio3> Hairless
<radio4> Other
------------------------------------------------------------------------------------------------------------------------

When the user highlights their choice via the radio button, and then
clicks on the SUBMIT Command Button, the form will display the
database results. For example:

------------------------------------------------------------------------------------------------------------------------
What is your favorite type of dog? You said: "Great Dane". Most
people The most popular choice was: "Beagle", chosen by 54% of
respondents.

What is your favorite type of cat? You said: "Hairless". Most
people The most popular choice was: "Siamese", chosen by 59% of
respondents.
------------------------------------------------------------------------------------------------------------------------

I see various types of controls, SQL Readers, Data Grids, etc. but
I'm wondering what would be the best way to do this in Visual Studio
2005? Does anyone have any "snippets" of code that does this that
they could post?

Thanks
Sam
 
Back
Top