Hello,
I have been working on several web based reports for a little while now, and just about ready to turn them in when I noticed all of the records display 8hrs ahead. After talking with Tech Support I was informed I can't connect to SQl Server. I must use the ODBC and connect through there server to get the data, and have it display properly.
After some messing around I managed to figure out the connection string, but I am not sure how to change my function to use it or if I can. Or is there a way to cheat and have it subtract 8 hours?
here is the ODBC string I need to use, and my function.
Thanks again for the help.
I have been working on several web based reports for a little while now, and just about ready to turn them in when I noticed all of the records display 8hrs ahead. After talking with Tech Support I was informed I can't connect to SQl Server. I must use the ODBC and connect through there server to get the data, and have it display properly.
After some messing around I managed to figure out the connection string, but I am not sure how to change my function to use it or if I can. Or is there a way to cheat and have it subtract 8 hours?
here is the ODBC string I need to use, and my function.
Thanks again for the help.
Code:
ARAuthentication=;DSN=AR System ODBC Data Source;UID=CH202806;ARServer=bkapp04;PWD=pword;SERVER=NotTheServer
Code:
Function SetData()
Dim connString As String = "server=bkwbreporting01;uid=sa;pwd=sa;database=ARSystem"
Dim conn As SqlConnection = new SqlConnection(connString)
Dim selectQuery As string = "Select assigned_to_group_, COUNT(*) AS tcktOpen FROM HPD_HelpDesk WHERE status >= 4 and DATEADD(dd, Create_Time / 86400, '1/1/1970') >= '" & nmStart & "' GROUP BY assigned_to_group_ Order By assigned_to_group_"
'Dim selectQuery As string = "SELECT DATEADD(dd, Create_Time / 86400, '1/1/1970') AS 'Date Open', COUNT(*) AS tcktOpen FROM HPD_HelpDesk WHERE (Assigned_To_Group_ = '" & MySelect.Value & "') and (Status <=4) GROUP BY DATEADD(dd, Create_Time / 86400, '1/1/1970') Order By DATEADD(dd, Create_Time / 86400, '1/1/1970')ASC"
'Dim selectQuery As string = "SELECT DATEADD(dd, Create_Time / 86400, '1/1/1970') AS 'Date Open', COUNT(*) AS tcktOpen FROM HPD_HelpDesk WHERE (Assigned_To_Group_ = '" & MySelect.Value & "') AND (Status <=4) GROUP BY DATEADD(dd, Create_Time / 86400, '1/1/1970') Order By DATEADD(dd, Create_Time / 86400, '1/1/1970')ASC"
Dim myCommand As SqlCommand = new SqlCommand(selectQuery, conn)
conn.Open()
Dim myReader As SqlDataReader = myCommand.ExecuteReader()
'set dataReader to data property
Chart.Series.Data = myReader
'Cleanup
myReader.Close()
conn.Close()
End Function