# Sqlite3 data insert problem

**URL:** <https://discourse.nodered.org/t/sqlite3-data-insert-problem/56075>\
**Category:** General\
**Created:** [4 January 2022 09:11 UTC](https://discourse.nodered.org/t/sqlite3-data-insert-problem/56075 "2022-01-04T09:11:13Z")\
**Posts on this page:** 1\
**Showing post:** 31

<div class="post-metadata">

**Author:** ![nerevar](https://avatars.discourse-cdn.com/v4/letter/n/f475e1/32.png) [@nerevar](https://discourse.nodered.org/u/nerevar)\
**Post date:** [5 January 2022 14:26 UTC](https://discourse.nodered.org/t/sqlite3-data-insert-problem/56075/31 "2022-01-05T14:26:46Z")

</div>

The issue has been corrected with version 1.0.2:

> <https://github.com/node-red/node-red-nodes/issues/870#issuecomment-1005546331>
>
> \<!--
> \## Before you hit that Submit button....
> 
> This issue tracker is for prob…lems with the extra nodes maintained by the Node-RED project.
> 
> If your issue is:
> - a general 'how-to' type question,
> - a feature request or suggestion for a change,
> - or problems with 3rd party (\`node-red-contrib-\`) nodes
> 
> please use the \[Node-RED Forum\](https://discourse.nodered.org) or \[slack team\](https://nodered.org/slack), or ask a question on \[Stack Overflow\](https://stackoverflow.com/questions/tagged/node-red) and tag it \`node-red\`.
> 
> That way the whole Node-RED user community can help, rather than rely on the core development team.
> 
> \## So you have a real issue to raise...
> 
> To help us understand the issue, please fill-in as much of the following information as you can:
> \--\>
> 
> \### Which node are you reporting an issue on?
> node-red-node-sqlite
> 
> \### What are the steps to reproduce?
> Insert data using: 
> \`INSERT INTO users\_connection\_data (ip, connected, date) VALUES ($1, $2, $3);\`
> or
> \`INSERT INTO users\_connection\_data (ip, connected, date) VALUES ($ip, $connected, $date);\`
> with the payload for binding:
> \`\["192.168.3.161",1,1641368629093\]\`
> 
> Table was created using:
> \`CREATE TABLE users\_connection\_data(id INTEGER PRIMARY KEY AUTOINCREMENT, ip TEXT, connected INTEGER, date INTEGER);\`
> 
> \### What happens?
> After the insert the node goes into the error state and does not work until Restart Flows.
> 
> \### What do you expect to happen?
> To insert the data and afterwords be able to use the node.
> 
> \### Please tell us about your environment:
> Node-RED version: v2.1.4
> Node.js version: v14.18.2
> Linux 4.19.95-rt38-v7 arm LE (debian 10)
> node-red-node-sqlite v1.01

`node-red-stop`  
`cd .node-red`  
`npm install node-red-node-sqlite@1.0.2`  
`node-red-start`

Note that when binding a payload the UPDATE also needs to be sent with "$", example:  
`UPDATE users_connection_data SET connected = $connected, date = $date WHERE ip = $ip;`

---

_[View the full topic](https://discourse.nodered.org/t/sqlite3-data-insert-problem/56075)._
