--- title: "system.db.runSFUpdateQuery" description: "Runs a query through the store and forward system and to multiple datasources at the same time." --- # system.db.runSFUpdateQuery > Runs a query through the store and forward system and to multiple datasources at the same time. This function is used in **Python Scripting**. ## Description Runs a query through the [Store and Forward](platform\database-connections\store-and-forward\store-and-forward.md) system and to multiple datasources at the same time. ## Client Permission Restrictions [Permission Type](ignition-modules\vision\vision-project-properties\vision-project-properties.md#vision-permissions-properties): Legacy Database Access Client access to this scripting function is blocked to users that do not meet the role/zone requirements for the above permission type. This function is unaffected when run in the Gateway scope. ## Syntax `system.db.runSFUpdateQuery(query, datasources)` ### Parameters Type | Parameter | Description ------- | ------- | ----- String| `query` | A query (typically an UPDATE, INSERT, or DELETE) to run. String[]| `datasources` | List of datasources to run the query through. ### Returns **Boolean** - Returns true if successful and false if not. ### Scope Gateway, Vision Client, Perspective Session ## Code Examples ```python title="Code Snippet" # Example 1: Run through single datasource print system.db.runSFUpdateQuery("INSERT INTO recipes (name, sp1, sp2, sp3) VALUES ('A Name', 1032, 234, 1)", ["MySQLDatasource"]) ``` ```python title="Code Snippet" # Example 2: Run through two datasources print system.db.runSFUpdateQuery("INSERT INTO recipes (name, sp1, sp2, sp3) VALUES ('A Name', 1032, 234, 1)", ["MySQLDatasource", "SQLServerDatasource"]) ```