# Updating a table

**URL:** <https://forum.inductiveautomation.com/t/updating-a-table/62004>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [July 18, 2022, 1:45pm UTC](https://forum.inductiveautomation.com/t/updating-a-table/62004 "2022-07-18T13:45:41Z")\
**Posts on this page:** 1\
**Page:** 2

<div class="post-metadata">

**Author:** ![mjohnson0238](https://avatars.discourse-cdn.com/v4/letter/m/4bbf92/32.png) [@mjohnson0238](https://forum.inductiveautomation.com/u/mjohnson0238)\
**Post date:** [July 19, 2022, 12:35pm UTC](https://forum.inductiveautomation.com/t/updating-a-table/62004/21 "2022-07-19T12:35:48Z")

</div>

Here is the code that got me what I wanted:

```auto
	Time = system.date.now()
	Name = self.session.custom.Name
	ID = self.session.custom.Badge_Num
	databaseConnection = "IgnitionHud"
#	system.db.runPrepUpdate("UPDATE IgnitionHud.dbo.SM_CheckIn SET Time = ? WHERE Name = ? AND Badge_Num = ?",[Time, Name, ID], databaseConnection)
	system.db.runPrepUpdate("INSERT INTO SM_CheckIn (Time, Name, Badge_Num) VALUES (?,?,?)", [Time, Name, ID])

```

Thank alot for all the help!

[Previous page](https://forum.inductiveautomation.com/t/updating-a-table/62004.md?page=1)
