# Issues with writing to DB

**URL:** <https://forum.inductiveautomation.com/t/issues-with-writing-to-db/101039>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [January 17, 2025, 2:03pm UTC](https://forum.inductiveautomation.com/t/issues-with-writing-to-db/101039 "2025-01-17T14:03:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nicholas\_Hunnell](https://avatars.discourse-cdn.com/v4/letter/n/7ea924/32.png) [@Nicholas\_Hunnell](https://forum.inductiveautomation.com/u/Nicholas_Hunnell)\
**Post date:** [January 17, 2025, 2:03pm UTC](https://forum.inductiveautomation.com/t/issues-with-writing-to-db/101039/1 "2025-01-17T14:03:27Z")

</div>

Hello, all my named queries work in the designer both in testing and when running specific views on the designer. But when I spin up the project nothing is going through and it is now giving me a web socket disconnection warning. The only other warning I am getting id missing views. Its worth it to add that I created one new view with a simple insert and that went through both on my project and my designer. Very confused by all this. Ignition Version : 8.1.44 Perspective, Designer is running on a separate PC, Project Queries does not work regardless of if I run it on the pc the designer is running, The pc hosting the gateway or any other device.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [January 17, 2025, 2:44pm UTC](https://forum.inductiveautomation.com/t/issues-with-writing-to-db/101039/2 "2025-01-17T14:44:09Z")

</div>

Welcome to the forum, Nicholas.

We'll need more specific information.

1. You've mentioned "view" and that implies Perspective rather than Vision. Edit your question title and add the Perspective tag from the list (or Vision if you meant that).
2. If you want to post code then please see [Wiki - how to post code on this forum](https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831). And add a caption to the code to tell us where the code resides.3
3. Which version of Ignition?
4. Are you running Designer on the gateway or a separate PC?

---

<div class="post-metadata">

**Author:** ![michael.flagler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/michael.flagler/32/26272_2.png) [@michael.flagler](https://forum.inductiveautomation.com/u/michael.flagler)\
**Post date:** [January 17, 2025, 9:14pm UTC](https://forum.inductiveautomation.com/t/issues-with-writing-to-db/101039/3 "2025-01-17T21:14:28Z")

</div>

How are you trying to use the queries in your views? Are you trying to use scripting or bindings? A little more details on how you've structured your connection to these queries will help.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [January 17, 2025, 9:55pm UTC](https://forum.inductiveautomation.com/t/issues-with-writing-to-db/101039/4 "2025-01-17T21:55:56Z")

</div>

If you are using scripting to call your named queries, please show the relevant code.

Please show how you have configured a non working Named Query?

Also, what Flavor of DB are you using MSSQL, Postgres, MySQL?

---

<div class="post-metadata">

**Author:** ![Nicholas\_Hunnell](https://avatars.discourse-cdn.com/v4/letter/n/7ea924/32.png) [@Nicholas\_Hunnell](https://forum.inductiveautomation.com/u/Nicholas_Hunnell)\
**Post date:** [January 30, 2025, 7:25pm UTC](https://forum.inductiveautomation.com/t/issues-with-writing-to-db/101039/5 "2025-01-30T19:25:01Z")

</div>

I missed some of these responses. The issue has been fixed, I had a navigation event occurring after my script event. This was causing the DB write to either be skipped or cut off too early. Scripting my navigation into the scripting event fixed the issue.

---

<div class="post-metadata">

**Author:** ![Felipe\_CRM](https://avatars.discourse-cdn.com/v4/letter/f/dfb087/32.png) [@Felipe\_CRM](https://forum.inductiveautomation.com/u/Felipe_CRM)\
**Post date:** [January 30, 2025, 7:40pm UTC](https://forum.inductiveautomation.com/t/issues-with-writing-to-db/101039/6 "2025-01-30T19:40:33Z")

</div>

Don't forget to mark your post as solution in case someone down the line has the same or similar issue due to events executing asynchronously.
