I am using Ignition 7.7.5
I have an Easy Chart that uses DB Pens. I am using a script to load the pens dataset with all the necessary information, here are the values of some of the columns for a single row.
COL_NAME = sngValue
TABLE_NAME = tblRealValues
XVAL_COL_NAME = dtTimeSampled
DATASOURCE = DB
WHERE_CLAUSE = lngTagId = 140
I have also bound the Chart’s ”Outer Range Start” and the ”Outer Range End” Properties to the Date Properties of 2 Pop Up Calenders.
I have 2 questions:
- The below is taken from the Active Queries window in the Database Connections Status Window on the Gateway. Why does the chart insert ”?” instead of the selected dates.
SELECT dtTimeSampled, sngValue FROM tblRealValues WHERE dtTimeSampled >= ? AND dtTimeSampled <= ? AND lngTagId = 140 ORDER BY dtTimeSampled.
The same appears also as an error message in a Read timed out exception.
I have queried the database for what queries are running on it and the out put is similar, here it is:
(@P0 datetime,@P1 datetime)SELECT dtTimeSampled FROM tblRealValues WHERE dtTimeSampled >= @P0 AND dtTimeSampled <= @P1 AND lngTagId = 140 ORDER BY dtTimeSampled
I have also tried to omit the binding to the Ranges, but that doesn’t change the output. I have also tried to insert the dtTimeSampled in the where Clause of the SQL. But the existing dtTimeSampled <= ? remains.
What am i doing wrong?
- The Date in the Pop Up Calenders is set to have a format ”dd-MM-yyyy HH:mm:ss”. It is bound to the chart’s ”Outer Range Start” and the ”Outer Range End” properties. Why do these 2 properties have a different date format (MM/dd/yyyy HH:mm:ss GMT) than the pop up calenders. I tried using a toDate(dateFormat(…,…)) expression to force the conversion to the format i want, but with no success.
Thanks