# System.db.runnamedquery not updating database

**URL:** <https://forum.inductiveautomation.com/t/system-db-runnamedquery-not-updating-database/72432>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [April 13, 2023, 6:43pm UTC](https://forum.inductiveautomation.com/t/system-db-runnamedquery-not-updating-database/72432 "2023-04-13T18:43:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jbb5310](https://avatars.discourse-cdn.com/v4/letter/j/ecc23a/32.png) [@jbb5310](https://forum.inductiveautomation.com/u/jbb5310)\
**Post date:** [April 13, 2023, 6:43pm UTC](https://forum.inductiveautomation.com/t/system-db-runnamedquery-not-updating-database/72432/1 "2023-04-13T18:43:28Z")

</div>

I have a named query to delete a record giving a parameter. the script runs no errors but does not delete the record on the database side. When using the named query testing tool it works fine but not through scripting. The query type is changed to update as a select would cause an error. Am I missing something?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/4/1421837eab2cb368c87e8156d38e5edcd72ef978.png)

---

<div class="post-metadata">

**Author:** ![kvane](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kvane/32/22228_2.png) [@kvane](https://forum.inductiveautomation.com/u/kvane)\
**Post date:** [April 13, 2023, 6:54pm UTC](https://forum.inductiveautomation.com/t/system-db-runnamedquery-not-updating-database/72432/2 "2023-04-13T18:54:33Z")

</div>

The parameter spelling in the Named Query definition and the parameter spelling used in the script are not aligned.

---

<div class="post-metadata">

**Author:** ![jbb5310](https://avatars.discourse-cdn.com/v4/letter/j/ecc23a/32.png) [@jbb5310](https://forum.inductiveautomation.com/u/jbb5310)\
**Post date:** [April 13, 2023, 7:02pm UTC](https://forum.inductiveautomation.com/t/system-db-runnamedquery-not-updating-database/72432/3 "2023-04-13T19:02:10Z")

</div>

Thank you so much. A little embarrassing that I didn't catch that but glad you did.
