# Updating SQL Database via Powertable Entry 8.1.3

**URL:** <https://forum.inductiveautomation.com/t/updating-sql-database-via-powertable-entry-8-1-3/45868>\
**Category:** Ignition\
**Created:** [April 21, 2021, 3:38pm UTC](https://forum.inductiveautomation.com/t/updating-sql-database-via-powertable-entry-8-1-3/45868 "2021-04-21T15:38:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dboyd](https://avatars.discourse-cdn.com/v4/letter/d/73ab20/32.png) [@dboyd](https://forum.inductiveautomation.com/u/dboyd)\
**Post date:** [April 21, 2021, 3:38pm UTC](https://forum.inductiveautomation.com/t/updating-sql-database-via-powertable-entry-8-1-3/45868/1 "2021-04-21T15:38:00Z")

</div>

I have had success updating a table via a standard table but when I try to do it on a Power Table I never get the data to update. Is the following code correct? “numID” is the autogenerated row ID of each entry.

Entered under CellEdited Extension functions (as shown here: [Updating the Database through the Power Table - Ignition User Manual 8.1 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC81/Updating+the+Database+through+the+Power+Table) )

key=self.data.getValueAt(rowIndex, “numID”)

query = “UPDATE tbl\_EastSSLADowntime SET %s = ? WHERE NumID = ?” % (colName)  
args = [newValue, key]

system.db.runPrepUpdate(query, args)

system.db.refresh(self, “data”)

---

<div class="post-metadata">

**Author:** ![dboyd](https://avatars.discourse-cdn.com/v4/letter/d/73ab20/32.png) [@dboyd](https://forum.inductiveautomation.com/u/dboyd)\
**Post date:** [April 23, 2021, 12:12pm UTC](https://forum.inductiveautomation.com/t/updating-sql-database-via-powertable-entry-8-1-3/45868/2 "2021-04-23T12:12:23Z")

</div>

MARKED AS SOLVED: After speaking to IA support, it was suggested to indent the entirety of the code block. That allowed the power table to updated as expected.
