# \[bug-16729\]Equipment Schedule MSSQL binding error

**URL:** <https://forum.inductiveautomation.com/t/bug-16729-equipment-schedule-mssql-binding-error/36282>\
**Category:** Ignition\
**Tags:** database, ignition80, vision\
**Created:** [July 2, 2020, 5:21am UTC](https://forum.inductiveautomation.com/t/bug-16729-equipment-schedule-mssql-binding-error/36282 "2020-07-02T05:21:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![john.eichler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/john.eichler/32/24632_2.png) [@john.eichler](https://forum.inductiveautomation.com/u/john.eichler)\
**Post date:** [July 2, 2020, 5:21am UTC](https://forum.inductiveautomation.com/t/bug-16729-equipment-schedule-mssql-binding-error/36282/1 "2020-07-02T05:21:56Z")

</div>

Ignition 8.0.9  
MSSQL Express

Hi All

I have 4 SQL tables which are read by an Equipment Schedule component. Eventually, these tables will be populated by our ERP/MES system. The tables are bound to “Items”, “Scheduled Events”, “Downtime Events” and “Break Events”.

The binding for “Scheduled Events” causes a null pointer error.

I have checked the structure of the SQL table and it appears to be OK. The correct data is shown in the datatable (within ignition). I have copied this to another Equipment Schedule control (without the binding) and it worked perfectly. I have tried with, and without an index column in the SQL structure.

Please see attached for images.

Please can someone explain what I have done wrong?

![SQL table structure](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/4/647bf59d9b1b7743571bd84f14d1841caffc3472.png)

 ![SQL data](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/f/2f39741e6d4377df0634fe8629cef02432f2b37e.png)  
 ![Query binding](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/8/e8d5ba25560e8bfce7a26dcaee100ab3657b5e67.png)  
 ![diagnostics](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/6/360360f5a6c50417d021ac82b2933d7412d1d1a5.png)  
 ![Error1](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/f/bf5a6b555ae1685d49e6f3f3130cf3af31e1f5ab.png) ![Error2](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/c/dc80783439da50a52b1e9a47629c3b6cd6bd2132.png) ![Error3](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/9/590628c6fd0120234a1906b15ec8b98f7ad79a9e.png)  
 ![Datatable](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/7/67f1026f467095ca2b74ec85f2abf991baa8887d.png)  
Thanks

---

<div class="post-metadata">

**Author:** ![john.eichler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/john.eichler/32/24632_2.png) [@john.eichler](https://forum.inductiveautomation.com/u/john.eichler)\
**Post date:** [July 2, 2020, 5:32am UTC](https://forum.inductiveautomation.com/t/bug-16729-equipment-schedule-mssql-binding-error/36282/2 "2020-07-02T05:32:04Z")

</div>

Further to this - If I add the erroneous SQL query binding to another Equipment Schedule control, without any other bindings my CPU usage goes very high and locks up the Ignition Designer forcing me to shut it down with task manager.

---

<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:** [July 2, 2020, 2:15pm UTC](https://forum.inductiveautomation.com/t/bug-16729-equipment-schedule-mssql-binding-error/36282/3 "2020-07-02T14:15:53Z")

</div>

`pctDone` is expected to be a numeric value, and cannot be null. Set a default value for the column, or coerce it in the query.

EDIT: The same applies to `leadTime`.

---

<div class="post-metadata">

**Author:** ![john.eichler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/john.eichler/32/24632_2.png) [@john.eichler](https://forum.inductiveautomation.com/u/john.eichler)\
**Post date:** [July 2, 2020, 8:50pm UTC](https://forum.inductiveautomation.com/t/bug-16729-equipment-schedule-mssql-binding-error/36282/4 "2020-07-02T20:50:16Z")

</div>

Great. Thank you!
