March 30th, 2013, 07:43 AM
MySQL data not displaying on Chart when run on server
I have a website that is written in Visual Web Developer 2010 Express.
One aspx page has a Chart control that accesses a MySQL database on my server Windows Server 2008 R2, IIS 7.
When run on the development machine (my laptop) the Chart display the data correctly.
However, when the website is copied to my server, the chart does not display the data.
My code to load the data:
'GET RECORDS OF PREVIOUS MONTH
Do Until MyDayCount = MyDayEnd
Dim Sql As String = "SELECT SUM(DiffWatt) FROM consumptrans WHERE Day='" & MyDayCount & "' AND Month='" & MyPreviousMonth & "' AND Year='" & MyPrevYear & "'AND ClientID='" & UserName & "'"
cmd = New MySqlClient.MySqlCommand(Sql, con)
reader = cmd.ExecuteReader()
MyWatts = reader.GetString(0)
If MyWatts.ToString IsNot Nothing Then
MyWatts = Val(MyWatts)
MyWatts = (MyWatts / 1000)
MyDayCount = MyDayCount + 1
Can anyone possibly point me in the right direction?
I do not know if there are server settings that are required on my server.