# 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:** 22

<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:** [4 January 2022 18:54 UTC](https://discourse.nodered.org/t/sqlite3-data-insert-problem/56075/22 "2022-01-04T18:54:59Z")

</div>

> [@Colin](#):
>
> ```auto
> When using Normal or Prepared Statement, the query must be entered in the node config.
> 
> Pass in the parameters as an object in msg.params for Prepared Statement. Ex:
> msg.params = {
> $id:1,
> $name:"John Doe"
> }
> Parameter object names must match parameters set up in the Prepared Statement. If you get the error SQLITE_RANGE: bind or column index out of range be sure to include $ on the parameter object key.
> The SQL query for the example above could be: insert into user_table (user_id, user) VALUES ($id, $name);
> 
> ```

This one works also, but It would be required to change the flows.

So the node has got multiple options of saving/accessing data:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/9/49ba597aae493d1ec544851f79fd05093c9fe9ee.png)

My pi has got this version installed:

```auto
Node-RED version: v2.1.4
Node.js version: v14.18.2
Linux 4.19.95-rt38-v7 arm LE
node-red-node-sqlite v1.01

```

And the windows test rig this one:

```auto
Node-RED version: v1.3.4
Node.js version: v14.16.1
Windows_NT 10.0.19043 x64 LE
node-red-node-sqlite v0.60

```

On v0.60 it all works without problems with normal topic binding.

Atm I am reinstalling the node once again following the advice in another topic:

> [@Sqlite doesn t work after update](https://discourse.nodered.org/t/sqlite-doesn-t-work-after-update/1830/12):
>
> I have exactly the same problem here on my RPi3 and I recently I found the solution, check if it works for you. Open a fresh installation of Node-RED Go to Manage Pallet Select the sqlite node and install it Do not touch the system for at least 10 minutes (even if the Node-RED interface tells you that the installation is done) If your hardware is older than the Pi3 maybe 15 minutes is enough. This happens because the compilation process of the sqlite binaries happens in background and it tak…

I will get back to you

---

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