# system.db.runPrepUpdate() problems "Unknown to Unknown"

**URL:** <https://forum.inductiveautomation.com/t/system-db-runprepupdate-problems-unknown-to-unknown/8411>\
**Category:** Ignition\
**Created:** [May 6, 2014, 10:24am UTC](https://forum.inductiveautomation.com/t/system-db-runprepupdate-problems-unknown-to-unknown/8411 "2014-05-06T10:24:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![miketob](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/miketob/32/5936_2.png) [@miketob](https://forum.inductiveautomation.com/u/miketob)\
**Post date:** [May 6, 2014, 10:24am UTC](https://forum.inductiveautomation.com/t/system-db-runprepupdate-problems-unknown-to-unknown/8411/1 "2014-05-06T10:24:53Z")

</div>

Hello,

I think the issue reported in [this post](http://www.inductiveautomation.com/forum/viewtopic.php?f=70&t=8964) is still unsolved.

When you use system.db.runPrepUpdate() with numeric parameters might get an error like this:

> [@](#):
>
> java.lang.Exception: java.lang.Exception: Error executing system.db.runPrepUpdate(UPDATE TreeViewsData SET sValor=? WHERE Folio=?, [Props\_string, 137], , , false, false)  
> caused by Exception: Error executing system.db.runPrepUpdate(UPDATE TreeViewsData SET sValor=? WHERE Folio=?, [Props\_string, 137], , , false, false)  
> caused by GatewayException: SQL error for "UPDATE TreeViewsData SET sValor=? WHERE Folio=?": La conversión de UNKNOWN a UNKNOWN no es compatible.  
> caused by SQLServerException: La conversión de UNKNOWN a UNKNOWN no es compatible.

This is happening to me with a MS SL Server 2008 R2 database, and not only with BigInts, but with any numeric type.

I think that, if this issue cannot be solved it would be great to add the workaround suggested in that post (casting to int) in the .runPrepUpdate() and .runPrepQuery() documentation, perhaps as a "known issue". That can save lots of hours of frustration.

Best,

---

<div class="post-metadata">

**Author:** ![martinezraul](https://avatars.discourse-cdn.com/v4/letter/m/7cd45c/32.png) [@martinezraul](https://forum.inductiveautomation.com/u/martinezraul)\
**Post date:** [February 1, 2018, 2:02pm UTC](https://forum.inductiveautomation.com/t/system-db-runprepupdate-problems-unknown-to-unknown/8411/2 "2018-02-01T14:02:24Z")

</div>

I’m still experiencing this issue 4 years later with Ignition 7.9.5. Is there any solution now that I’m not aware of?

Regards!

---

<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:** [February 1, 2018, 2:13pm UTC](https://forum.inductiveautomation.com/t/system-db-runprepupdate-problems-unknown-to-unknown/8411/3 "2018-02-01T14:13:44Z")

</div>

Ignition comes with painfully old JDBC drivers, for backward compatibility presumably. Replace the driver with the newest for your DB and many problems go away. Problems with round trips from `java.lang.Long` to jython `long` and back to `java.lang.Long` are a known problem in many older drivers.

---

<div class="post-metadata">

**Author:** ![alexraymond](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alexraymond/32/16951_2.png) [@alexraymond](https://forum.inductiveautomation.com/u/alexraymond)\
**Post date:** [February 1, 2018, 3:10pm UTC](https://forum.inductiveautomation.com/t/system-db-runprepupdate-problems-unknown-to-unknown/8411/4 "2018-02-01T15:10:14Z")

</div>

Is this safe to do? Or are there any compatibility issues with Ignition to be aware of?
