TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Inaam Hammouda
NA
42
6.9k
real time chart and databse
May 8 2016 7:03 PM
hi beautiful people ,
i want to display real chart time , binded with Mysql databse .
Axe x shows the speed (int ) and Y shows DATETIME .
my databse get updated every second
my load graph function is :
public
void
load_graph()
{
MySql.Data.MySqlClient.MySqlCommand cmd =
new
MySql.Data.MySqlClient.MySqlCommand(
"select * from val_api"
, conn);
MySql.Data.MySqlClient.MySqlDataReader reader;
try
{
conn.Open();
reader = cmd.ExecuteReader();
while
(reader.Read())
{
this
.chart1.Series[
"Vitesse"
].Points.AddXY(reader.GetInt16(
"vitesse"
), reader.GetDateTime(
"dateV"
));
this
.chart1.Update();
}
}
catch
(Exception ex)
{
MessageBox.Show(
this
, ex.Message);
}
conn.Close();
}
i tried using this fuction with timer , but it doesn't work , a line shows up and than my app stops without throwing any exception .
can you please help
Reply
Answers (
1
)
finding the order of execution of the Jobs
Control a Datagrid from another class