jasonsalas
IS-IT--Management
Here's what I'm trying to do: I'm running an online election service, so candidates under a senatorial race appear on a ballot, but logically, can be voted for (or not), using checkboxes. My problem in processing the info.
To display this in ASP, I need a single field populated in my DB to call from my derived recordset. I first tried using boolean values, but the resultant recordset then has a different field name per candidate (of which there are a lot), and it doesn't come out with values all under a single field, which I can't displaying in ASP.
I'd optimally like the DB table to have the following:
tblElection
- fieldID (autoID)
- fieldName (text)
- fieldPartyAffiliation (text)
- fieldVotes (number)
The main problem is getting all of those candidates with their respective vote totals all under one unified field name. I was thinking I might have to loop to SQL insert statement to go over the ballot and insert a "checked" value, and then in a DB query for presentation sum up all of the votes. But that's where I'm stuck.
I've racked my brain trying to figure this one out...any suggestions on the DB design?
Thanks!![Smile :) :)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
To display this in ASP, I need a single field populated in my DB to call from my derived recordset. I first tried using boolean values, but the resultant recordset then has a different field name per candidate (of which there are a lot), and it doesn't come out with values all under a single field, which I can't displaying in ASP.
I'd optimally like the DB table to have the following:
tblElection
- fieldID (autoID)
- fieldName (text)
- fieldPartyAffiliation (text)
- fieldVotes (number)
The main problem is getting all of those candidates with their respective vote totals all under one unified field name. I was thinking I might have to loop to SQL insert statement to go over the ballot and insert a "checked" value, and then in a DB query for presentation sum up all of the votes. But that's where I'm stuck.
I've racked my brain trying to figure this one out...any suggestions on the DB design?
Thanks!