Click here to Skip to main content
15,881,715 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
How do i read from an SQL database and output the result to a bar on a chart, then repeat for the next line in the database and the next bar on the chart?

My situation is:

I have a database that is created when the user creates a new "event" (like a festival, concert etc). I also have a form that allows the user to input numbers of people in an out, which adds these to a table in the database. I have a column in the table that calculates the total in and total out for all the gates.

Now, my problem... I need to put these totals values to a bar chart. I need the program to add the total in value to the chart, then the total out to the chart in a different colour. This needs to be done every time the user adds a line to the database for a new bar in the chart. So for example 1am, 200in, 130 out. 2pm, 100 in, 70 out. 3pm, 100 in, 140 out.

And these will display on the chart for a 24 hour period. Can anyone help?
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900