# \[BUG-6247\]Database Pen Digitals - Easy Chart

**URL:** <https://forum.inductiveautomation.com/t/bug-6247-database-pen-digitals-easy-chart/60899>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [June 17, 2022, 5:02pm UTC](https://forum.inductiveautomation.com/t/bug-6247-database-pen-digitals-easy-chart/60899 "2022-06-17T17:02:23Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![mcolson1590](https://avatars.discourse-cdn.com/v4/letter/m/e8c25b/32.png) [@mcolson1590](https://forum.inductiveautomation.com/u/mcolson1590)\
**Post date:** [June 17, 2022, 5:02pm UTC](https://forum.inductiveautomation.com/t/bug-6247-database-pen-digitals-easy-chart/60899/1 "2022-06-17T17:02:23Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![mcolson1590](https://avatars.discourse-cdn.com/v4/letter/m/e8c25b/32.png) [@mcolson1590](https://forum.inductiveautomation.com/u/mcolson1590)\
**Post date:** [June 22, 2022, 1:32pm UTC](https://forum.inductiveautomation.com/t/bug-6247-database-pen-digitals-easy-chart/60899/2 "2022-06-22T13:32:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 22, 2022, 9:03pm UTC](https://forum.inductiveautomation.com/t/bug-6247-database-pen-digitals-easy-chart/60899/3 "2022-06-22T21:03:32Z")

</div>

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:

```auto
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. @paul-griffith ?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [June 22, 2022, 9:17pm UTC](https://forum.inductiveautomation.com/t/bug-6247-database-pen-digitals-easy-chart/60899/4 "2022-06-22T21:17:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 23, 2022, 11:11am UTC](https://forum.inductiveautomation.com/t/bug-6247-database-pen-digitals-easy-chart/60899/5 "2022-06-23T11:11:18Z")

</div>

In my case, a PostgreSQL database pen.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [June 23, 2022, 4:12pm UTC](https://forum.inductiveautomation.com/t/bug-6247-database-pen-digitals-easy-chart/60899/6 "2022-06-23T16:12:07Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 23, 2022, 4:55pm UTC](https://forum.inductiveautomation.com/t/bug-6247-database-pen-digitals-easy-chart/60899/7 "2022-06-23T16:55:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [June 23, 2022, 5:03pm UTC](https://forum.inductiveautomation.com/t/bug-6247-database-pen-digitals-easy-chart/60899/8 "2022-06-23T17:03:09Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 23, 2022, 5:07pm UTC](https://forum.inductiveautomation.com/t/bug-6247-database-pen-digitals-easy-chart/60899/9 "2022-06-23T17:07:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mcolson1590](https://avatars.discourse-cdn.com/v4/letter/m/e8c25b/32.png) [@mcolson1590](https://forum.inductiveautomation.com/u/mcolson1590)\
**Post date:** [June 24, 2022, 3:03pm UTC](https://forum.inductiveautomation.com/t/bug-6247-database-pen-digitals-easy-chart/60899/10 "2022-06-24T15:03:55Z")

</div>

In my case it was a new install.

---

<div class="post-metadata">

**Author:** ![sedamda](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@sedamda](https://forum.inductiveautomation.com/u/sedamda)\
**Post date:** [January 11, 2024, 4:47pm UTC](https://forum.inductiveautomation.com/t/bug-6247-database-pen-digitals-easy-chart/60899/11 "2024-01-11T16:47:15Z")

</div>

Any updates on this?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [January 11, 2024, 4:47pm UTC](https://forum.inductiveautomation.com/t/bug-6247-database-pen-digitals-easy-chart/60899/12 "2024-01-11T16:47:49Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![chirag\_kotadiya](https://avatars.discourse-cdn.com/v4/letter/c/e47c2d/32.png) [@chirag\_kotadiya](https://forum.inductiveautomation.com/u/chirag_kotadiya)\
**Post date:** [February 14, 2024, 6:34am UTC](https://forum.inductiveautomation.com/t/bug-6247-database-pen-digitals-easy-chart/60899/13 "2024-02-14T06:34:08Z")

</div>

Hello @paul-griffith,

any update on this?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [February 14, 2024, 5:41pm UTC](https://forum.inductiveautomation.com/t/bug-6247-database-pen-digitals-easy-chart/60899/14 "2024-02-14T17:41:27Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![nathan.boeger](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nathan.boeger/32/87646_2.png) [@nathan.boeger](https://forum.inductiveautomation.com/u/nathan.boeger)\
**Post date:** [May 29, 2024, 4:57pm UTC](https://forum.inductiveautomation.com/t/bug-6247-database-pen-digitals-easy-chart/60899/15 "2024-05-29T16:57:18Z")

</div>

Fixed in 8.1.39
