# Named query transaction with database parameter

**URL:** <https://forum.inductiveautomation.com/t/named-query-transaction-with-database-parameter/116331>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [July 9, 2026, 3:06pm UTC](https://forum.inductiveautomation.com/t/named-query-transaction-with-database-parameter/116331 "2026-07-09T15:06:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dreeves](https://avatars.discourse-cdn.com/v4/letter/d/f14d63/32.png) [@dreeves](https://forum.inductiveautomation.com/u/dreeves)\
**Post date:** [July 9, 2026, 3:06pm UTC](https://forum.inductiveautomation.com/t/named-query-transaction-with-database-parameter/116331/1 "2026-07-09T15:06:20Z")

</div>

I have a named query that takes the database as a parameter (lets say i pass databaseA). If I begin a transaction on databaseB and pass that to the system.db.runNamedQuery function, does it ignore the tx or does that override the database parameter?

This, of course, assumes databaseA and databaseB are two distinct servers.

---

<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 9, 2026, 3:29pm UTC](https://forum.inductiveautomation.com/t/named-query-transaction-with-database-parameter/116331/2 "2026-07-09T15:29:02Z")

</div>

Transactions 'win', ultimately, on the backend; it doesn't matter what you specify in the individual call if you also specified a transaction ID. It's possible frontend validation exists in some scope/depending on exactly which function you're calling to tell you that you're doing something silly, but I couldn't say for sure.

Just for the sake of it, I'll also explicitly state - a transaction cannot run on multiple databases, no matter what you do. By definition a transaction is only transactional across one database.

---

<div class="post-metadata">

**Author:** ![dreeves](https://avatars.discourse-cdn.com/v4/letter/d/f14d63/32.png) [@dreeves](https://forum.inductiveautomation.com/u/dreeves)\
**Post date:** [July 9, 2026, 3:37pm UTC](https://forum.inductiveautomation.com/t/named-query-transaction-with-database-parameter/116331/3 "2026-07-09T15:37:47Z")

</div>

Ok, that is what I thought. Thanks!
