# Inserting data to database using store and forward

**URL:** <https://forum.inductiveautomation.com/t/inserting-data-to-database-using-store-and-forward/99099>\
**Category:** Module Development\
**Tags:** ignition81, database\
**Created:** [November 25, 2024, 9:38pm UTC](https://forum.inductiveautomation.com/t/inserting-data-to-database-using-store-and-forward/99099 "2024-11-25T21:38:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Grace\_Gan](https://avatars.discourse-cdn.com/v4/letter/g/e5b9ba/32.png) [@Grace\_Gan](https://forum.inductiveautomation.com/u/Grace_Gan)\
**Post date:** [November 25, 2024, 9:38pm UTC](https://forum.inductiveautomation.com/t/inserting-data-to-database-using-store-and-forward/99099/1 "2024-11-25T21:38:10Z")

</div>

Hi,

I would like to insert tag value changes to a database via store and forward. Note that I am trying to insert the value to a custom table instead of the default historian tables created by ignition. (for simplicity of this discussion let's assume the custom table in database and the tag change listener already exist, and I just need a function that will allow me to insert the data to the custom table).

What do I need to implement to add insert sql commands to the store and forward system with the right data and the right destination to be executed?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [November 25, 2024, 9:51pm UTC](https://forum.inductiveautomation.com/t/inserting-data-to-database-using-store-and-forward/99099/2 "2024-11-25T21:51:29Z")

</div>

~~[system.db.runSFPrepUpdate()](https://www.docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-db/system-db-runSFPrepUpdate)~~

Whoops. Module development. Not sure.
