# \[IGN-3829\] Error executing system.db.commitTransaction

**URL:** <https://forum.inductiveautomation.com/t/ign-3829-error-executing-system-db-committransaction/49595>\
**Category:** Ignition\
**Created:** [August 5, 2021, 1:47pm UTC](https://forum.inductiveautomation.com/t/ign-3829-error-executing-system-db-committransaction/49595 "2021-08-05T13:47:50Z")\
**Posts on this page:** 1\
**Showing post:** 27

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [July 10, 2023, 6:21pm UTC](https://forum.inductiveautomation.com/t/ign-3829-error-executing-system-db-committransaction/49595/27 "2023-07-10T18:21:15Z")

</div>

I had a similar problem when I was trying to set up an all or nothing write to our DB. What fixed it for me was the first query in the transaction (after getting the transaction ID) needed to have the project argument filled. Subsequent named query calls do not need that parameter filled.

This worked:

```auto
txID = system.db.beginNamedQueryTransaction(project="project1", database="database1")
try:
    system.db.runNamedQuery(project="project1", path="query1", params=params1, tx=txID)
    #do some stuff

    system.db.runNamedQuery(path="query2", params=params2, tx=txID)
    # do more stuff
    system.db.commitTransaction(txID)

except:
    system.db.rollbackTransaction(txID)

finally:
    system.db.closeTransaction(txID)

```

but this would not work, for whatever reason:

```auto
txID = system.db.beginNamedQueryTransaction(project="project1", database="database1")

try:
    system.db.runNamedQuery(path="query1", params=params1, tx=txID)
    #do some stuff

    system.db.runNamedQuery(path="query2", params=params2, tx=txID)
    # do more stuff
    system.db.commitTransaction(txID)

except:
    system.db.rollbackTransaction(txID)

finally:
    system.db.closeTransaction(txID)

```

---

_[View the full topic](https://forum.inductiveautomation.com/t/ign-3829-error-executing-system-db-committransaction/49595)._
