Help Voting project in VB.net

db , vb.net Lithuania
  • 10 years ago

     Can any one help me with this. im developing a voting program in VB.net and i have a problem with the combobox.
    my database structure is this:

    table1
    elec_id
    election_name

    Table2
    Position_id
    Position_name
    elec_id(foreign key)

    table3
    Candidate_id
    Candidate
    Position_id(foreign key)


    i had create a module for creating election. firts form would ask for the name of election then 2nd form for the position and 3rd are for the candidates.

    the combobox is fill with the election_name from table1 and when i selected an item from the combobox i want get the other data from the other tables and put the candidate on radiobuttons so that user can vote from them.

    example is election_name is "election2008" then all positions,candidates from election2008 would be fetch from the database.

    Hope someone could help me.

  • 10 years ago

    Using just lowest level of sql (commands) should be shortest way in this case. Check out this page for primitives of sql commands. For generating radios make some groupbox or panel, and after storing New RadioButton objects in some array also addRange this array to this EgPanel1.Controls collection dynamically. As understanded, i guess, I suggest Reader = ExecuteQuery(Select) solution for filling up values related to changed value.

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Better train people and risk they leave – than do nothing and risk they stay.” - Anonymous