# system.db.runUpdateQuery suddenly started returning -1

**URL:** <https://forum.inductiveautomation.com/t/system-db-runupdatequery-suddenly-started-returning-1/25524>\
**Category:** Ignition\
**Tags:** ignition79, scripting\
**Created:** [June 4, 2019, 12:18am UTC](https://forum.inductiveautomation.com/t/system-db-runupdatequery-suddenly-started-returning-1/25524 "2019-06-04T00:18:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cmaynes](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmaynes/32/6852_2.png) [@cmaynes](https://forum.inductiveautomation.com/u/cmaynes)\
**Post date:** [June 4, 2019, 12:18am UTC](https://forum.inductiveautomation.com/t/system-db-runupdatequery-suddenly-started-returning-1/25524/1 "2019-06-04T00:18:14Z")

</div>

I now get back -1 from system.db.runUpdateQuery on inserting, even though it worked and saved the data. I have changed nothing about Ignition. I am running 7.9.6.

I was relying on this to be greater than 0 in a few places to verify the insert worked and didn’t conflict with table constraints.

I don’t control my database anymore, so it may be possible a setting in the database changed…

Anyone else with this problem? Any ideas why it happens?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [June 4, 2019, 12:28am UTC](https://forum.inductiveautomation.com/t/system-db-runupdatequery-suddenly-started-returning-1/25524/2 "2019-06-04T00:28:25Z")

</div>

SQL Server? [https://stackoverflow.com/a/40716168/85927](https://stackoverflow.com/a/40716168/85927)
