[BUG-6247]Database Pen Digitals - Easy Chart

The database pens that I have which are digital are not appearing on my chart. If I use X-Trace when only trending digitals, it shows Dec 31, 1969 5:59:59 PM, as if there is no data. The digitals are stored in a SQL Server table as bits. When I run diagnostics on the pens, I get no warnings or errors. Any thoughts on why I can’t trend the bits?

I had to change the booleans to something other than bits. In this case I used “tiny int”.

I think this is a bug. A v7.9 system that is now v8.1.15 that had booleans on an easy chart is now displaying nothing. I get many:

Invalid type [Boolean] for pen [NoGood]. Expected a [Number].
Invalid type [Boolean] for pen [NoGood]. Expected a [Number].
Invalid type [Boolean] for pen [NoGood]. Expected a [Number].

in the diagnostic console. @PGriffith ?

Hmm. That particular check should have always failed for Boolean, dating back at least a decade. What’s the source of this dataset?

In my case, a PostgreSQL database pen.

Hmm. I can reproduce, but there’s nothing that’s changed any time recently.
BIT appears to be correctly coerced into BOOLEAN when the ResultSetMetaData from the Postgres driver returns typecode -7 (java.sql.Types#BIT). Was the 8.X system that’s not working a new install, or restored from a .gwbk? Maybe the Postgres driver is a different version?

Upgrade, but I replaced the postgres driver after upgrade. It’s 42.2.18.

Note that the problem isn’t that the data isn’t a boolean, but that the EasyChart (or EasyNoteChart) won’t plot the boolean.

Yeah, but the code that says “don’t plot a boolean” has been there since at least 2011. Nothing is mangling the data types before then - it’s coming in from the gateway as a boolean column. So the only way it could have worked previously is if the column was showing up as an integer value, which appears to be all happening at the DB layer.
We can obviously still fix it, but the only behavior difference is in the JDBC driver, I think.

Probably worth fixing, but not urgent. This client didn’t really need that specific pen. I suspect the older driver was delivering a tinyint. This is a DB pen, so I could make view for that table that casts the booleans.

1 Like

In my case it was a new install.

Any updates on this?

No. But I just bumped the ticket I originally created a bit in priority.

Hello @PGriffith,

any update on this?

No, but since it's been an embarrassingly long time and it should be a simple fix on our end, I'm going to try to get it fixed within the next few releases.