# 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:** 20\
**Page:** 1

<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 09:11 UTC](https://discourse.nodered.org/t/sqlite3-data-insert-problem/56075/1 "2022-01-04T09:11:13Z")

</div>

Upon installing the sqlite vian node-red on new buster instalation, I noticed I cannot write to the db using binded payload.  
When trying to run it from the command line it says: `-bash: sqlite3: command not found`  
So, I got back to the node-red library ([node-red-node-sqlite (node) - Node-RED](https://flows.nodered.org/node/node-red-node-sqlite)) and saw I need to install it using provided command via npm.  
Thats what I did and I still cannot run the sqlite3 from the command line.

There were some vulnerabilities which I don't know how to fix. I cannot unistall it from the node-red either because the node is already used cca 20x in all the flows.  
Any help, please?

```auto
pi@RevPi100299:~/.node-red $ npm audit

                       === npm audit security report ===

┌──────────────────────────────────────────────────────────────────────────────┐
│ Manual Review │
│ Some vulnerabilities require your attention to resolve │
│ │
│ Visit https://go.npm.me/audit-guide for additional guidance │
└──────────────────────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ High │ Arbitrary File Creation/Overwrite on Windows via │
│ │ insufficient relative path sanitization │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package │ tar │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in │ >=4.4.18 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ node-red-node-sqlite │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path │ node-red-node-sqlite > sqlite3 > node-gyp > tar │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info │ https://github.com/advisories/GHSA-5955-9wpr-37jh │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ High │ Arbitrary File Creation/Overwrite via insufficient symlink │
│ │ protection due to directory cache poisoning using symbolic │
│ │ links │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package │ tar │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in │ >=4.4.18 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ node-red-node-sqlite │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path │ node-red-node-sqlite > sqlite3 > node-gyp > tar │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info │ https://github.com/advisories/GHSA-qq89-hq3f-393p │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ High │ Arbitrary File Creation/Overwrite via insufficient symlink │
│ │ protection due to directory cache poisoning using symbolic │
│ │ links │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package │ tar │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in │ >=4.4.16 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ node-red-node-sqlite │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path │ node-red-node-sqlite > sqlite3 > node-gyp > tar │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info │ https://github.com/advisories/GHSA-9r2w-394v-53qc │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ High │ Arbitrary File Creation/Overwrite due to insufficient │
│ │ absolute path sanitization │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package │ tar │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in │ >=3.2.2 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ node-red-node-sqlite │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path │ node-red-node-sqlite > sqlite3 > node-gyp > tar │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info │ https://github.com/advisories/GHSA-3jfq-g458-7qm9 │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ High │ Arbitrary File Creation/Overwrite via insufficient symlink │
│ │ protection due to directory cache poisoning │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package │ tar │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in │ >=3.2.3 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ node-red-node-sqlite │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path │ node-red-node-sqlite > sqlite3 > node-gyp > tar │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info │ https://github.com/advisories/GHSA-r628-mhmh-qjhw │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate │ ReDoS in Sec-Websocket-Protocol header │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package │ ws │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in │ >=7.4.6 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ node-red-contrib-revpi-nodes │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path │ node-red-contrib-revpi-nodes > ws │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info │ https://github.com/advisories/GHSA-6fc8-4gx4-v693 │
└───────────────┴──────────────────────────────────────────────────────────────┘
found 6 vulnerabilities (1 moderate, 5 high) in 240 scanned packages
  6 vulnerabilities require manual review. See the full report for details.
pi@RevPi100299:~/.node-red $ ^C
pi@RevPi100299:~/.node-red $ npm audit fix
up to date in 7.271s

20 packages are looking for funding
  run `npm fund` for details

fixed 0 of 6 vulnerabilities in 240 scanned packages
  6 vulnerabilities required manual review and could not be updated

```

---

<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 09:30 UTC](https://discourse.nodered.org/t/sqlite3-data-insert-problem/56075/2 "2022-01-04T09:30:55Z")

</div>

```auto
Welcome to Node-RED
===================
4 Jan 10:26:26 - [info] Node-RED version: v2.1.4
4 Jan 10:26:26 - [info] Node.js version: v14.18.2
4 Jan 10:26:26 - [info] Linux 4.19.95-rt38-v7 arm LE
4 Jan 10:26:27 - [info] Loading palette nodes
4 Jan 10:26:31 - [info] mDashboard version 2.19.4-beta started at /mui
4 Jan 10:26:31 - [info] Settings file : /home/pi/.node-red/settings.js
4 Jan 10:26:31 - [info] HTTP Static : /home/pi/.node-red/static
4 Jan 10:26:31 - [info] Context store : 'memoryOnly' [module=memory]
4 Jan 10:26:31 - [info] Context store : 'file' [module=localfilesystem]
4 Jan 10:26:31 - [info] User directory : /home/pi/.node-red
4 Jan 10:26:31 - [warn] Projects disabled : editorTheme.projects.enabled=false
4 Jan 10:26:31 - [info] Flows file : /home/pi/.node-red/flows.json
4 Jan 10:26:31 - [info] Server now running at http://127.0.0.1:1880/
4 Jan 10:26:32 - [warn]
---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.
If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.
You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------
4 Jan 10:26:35 - [info] Starting flows
4 Jan 10:26:37 - [info] Started flows
4 Jan 10:26:41 - [info] [sqlitedb:73ac2ee8378b3e02] opened ODIN_petr_log.db ok
4 Jan 10:26:41 - [info] [sqlitedb:a6765b51df58e4ea] opened quilters_data.db ok
4 Jan 10:26:41 - [info] [sqlitedb:b17145b6.55f138] opened quilters_data.db ok
4 Jan 10:26:41 - [info] [sqlitedb:eca8059d.a2a5a8] opened /home/pi/ODIN_petr_log.db ok
4 Jan 10:26:41 - [error] [sqlitedb:88903112.5c2a5] failed to open /var/www/ODIN_petr_log.db
4 Jan 10:26:41 - [error] [sqlitedb:1c25415d.b8427f] failed to open /home/pi/sqlite/nodered
4 Jan 10:26:41 - [error] [function:round value] TypeError: Cannot read property 'toFixed' of undefined
4 Jan 10:26:42 - [error] [file in:maint. storage] Error: ENOENT: no such file or directory, open '/home/pi/storage_data_maintenance.json'
4 Jan 10:26:42 - [info] [mqtt-broker:9592ef48.17181] Connected to broker: mqtt://192.168.2.194:1883
4 Jan 10:26:42 - [info] [mqtt-broker:debb8505.d64ad8] Connected to broker: mqtt://192.168.2.192:1883
4 Jan 10:26:42 - [info] [mqtt-broker:a611a9a9.f3df88] Connected to broker: mqtt://192.168.2.195:1883
4 Jan 10:26:42 - [info] [mqtt-broker:b1a22c0f.9ab4c] Connected to broker: mqtt://192.168.2.193:1883
4 Jan 10:26:42 - [info] [mqtt-broker:8cbd7ede.f8fda] Connected to broker: mqtt://192.168.2.193:1883
4 Jan 10:26:42 - [error] [function:chart refresh] TypeError: Cannot read property 'toFixed' of undefined
4 Jan 10:26:42 - [info] [mqtt-broker:464b285.50965d8] Connected to broker: mqtt://localhost:1883
4 Jan 10:26:42 - [info] [mqtt-broker:1e2a8d13.55b9a3] Connected to broker: mqtt://localhost:1883
4 Jan 10:26:42 - [error] [function:export preparation] TypeError: Cannot read property 'toFixed' of undefined

```

I did try npm rebuild and it seems it finished OK:

```auto
make: Leaving directory '/home/pi/.node-red/node_modules/sqlite3/build'
sqlite3@5.0.2 /home/pi/.node-red/node_modules/sqlite3

```

```auto
pi@RevPi100299:~/.node-red $ npm list sqlite3
node-red-project@0.0.1 /home/pi/.node-red
└─┬ node-red-node-sqlite@1.0.1
  └── sqlite3@5.0.2

```

However, I still don't undestand why it wont run...

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [4 January 2022 09:54 UTC](https://discourse.nodered.org/t/sqlite3-data-insert-problem/56075/3 "2022-01-04T09:54:54Z")

</div>

What makes you think it is a problem with the install? It has successfully opened four of your databases. It has failed to open the last two, that may be a problem with access permissions or similar. Are you intentionally opening databases in a number of different folders?

---

<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 10:10 UTC](https://discourse.nodered.org/t/sqlite3-data-insert-problem/56075/4 "2022-01-04T10:10:12Z")

</div>

No, I have several old flows with old paths to the DB-s. The ones it opened are relevant.

This is the syntax I'm using to fiull up the fields (This all worked OK before the update):

```auto
msg = {}; 
msg1 = {
  topic: "INSERT INTO users_connection_data (ip, connected, date) VALUES (?, ?, ?);",
  payload: ["192", 2, 15444444444423]
};
return msg1;

```

So If DB-s are opened why it wont write in them? Permission? Ill try changing it to `sudo chmod u+x`, but why it wont open in the terminal?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [4 January 2022 10:21 UTC](https://discourse.nodered.org/t/sqlite3-data-insert-problem/56075/6 "2022-01-04T10:21:46Z")

</div>

How do you know it didn't write into the db?

---

<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 11:05 UTC](https://discourse.nodered.org/t/sqlite3-data-insert-problem/56075/7 "2022-01-04T11:05:11Z")

</div>

Well, because when nothing is written except for the ID:

```auto
[{"id":1,"ip":null,"connected":null,"name":null,"date":null},{"id":2,"ip":null,"connected":null,"name":null,"date":null},{"id":3,"ip":null,"connected":null,"name":null,"date":null},{"id":4,"ip":null,"connected":null,"name":null,"date":null},{"id":5,"ip":null,"connected":null,"name":null,"date":null}]

```

It work OK inline, but bind not

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [4 January 2022 11:19 UTC](https://discourse.nodered.org/t/sqlite3-data-insert-problem/56075/8 "2022-01-04T11:19:02Z")

</div>

What message comes out from the mysql node when you try to insert (set the debug node to output complete message).  
Also add a Catch node linked to the mysql node and see if it catches anything.

Please also edit the title of this thread to something more meaningful, since it relates to being unable to insert into mysql, not an install issue.

---

<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 11:42 UTC](https://discourse.nodered.org/t/sqlite3-data-insert-problem/56075/9 "2022-01-04T11:42:42Z")

</div>

This is the input to the sqlite node:

```auto
1/4/2022, 12:37:55 PMnode: 4688f27f756472b1
INSERT INTO users_connection_data (ip, connected, date) VALUES (?, ?, ?); : msg : Object
object
topic: "INSERT INTO users_connection_data (ip, connected, date) VALUES (?, ?, ?);"
payload: array[3]
_msgid: "a9b9c904d58e0053"

```

and this is the output of the sqlite node:

```auto
1/4/2022, 12:37:55 PMnode: 2cb86db46f40a6ed
INSERT INTO users_connection_data (ip, connected, date) VALUES (?, ?, ?); : msg : Object
object
topic: "INSERT INTO users_connection_data (ip, connected, date) VALUES (?, ?, ?);"
payload: array[0]
_msgid: "a9b9c904d58e0053"

```

No errors from the sqlite node, not does the catch node catches anything from this node..

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [4 January 2022 12:12 UTC](https://discourse.nodered.org/t/sqlite3-data-insert-problem/56075/10 "2022-01-04T12:12:27Z")

</div>

Can you post a screenshot of those please? I don't fully understand what you have posted.

Also show us the database schema please.

**[Edit]** If you look at the [description of the node](https://flows.nodered.org/node/node-red-node-mysql) you will see that for prepared queries the column names should be between back ticks.

---

<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 12:25 UTC](https://discourse.nodered.org/t/sqlite3-data-insert-problem/56075/11 "2022-01-04T12:25:55Z")

</div>

> [@Colin](#):
>
> **[Edit]** If you look at the [description of the node](https://flows.nodered.org/node/node-red-node-mysql) you will see that for prepared queries the column names should be between back ticks.

Yes, but I'm using a SQLite

flow:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/b/1b715c33983ce728299f058a5a8f34b56f2217ea.png)

sqlite insput and output:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/0/5090c29fd603b0c24076fa429d32b89df0ddd612.png)

sqlite SELECT \* FROM: (note the \* was a direct insert without a binded payload)

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/8/7844aa2b5462d322b85ca96ff229ccc6eb787129.png)

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [4 January 2022 12:43 UTC](https://discourse.nodered.org/t/sqlite3-data-insert-problem/56075/12 "2022-01-04T12:43:53Z")

</div>

Reading the node info it does not say that the query values are sent in msg.payload.  
Have you tried sending a msg.topic with values added.

```auto
"INSERT INTO users_connection_data (ip, connected, date) VALUES ('192', 2, 1234567890);"

```

---

<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 12:53 UTC](https://discourse.nodered.org/t/sqlite3-data-insert-problem/56075/13 "2022-01-04T12:53:24Z")

</div>

> [@E1cid](#):
>
> `INSERT INTO users_connection_data (ip, connected, date) VALUES ('192', 2, 1234567890`

Yes, In this case it writes them into the DB:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/e/7e5622deb897f719742081f3f0358842c7421c01.png)

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [4 January 2022 12:55 UTC](https://discourse.nodered.org/t/sqlite3-data-insert-problem/56075/14 "2022-01-04T12:55:33Z")

</div>

Then that is your solution, add the values to the topic query.  
e.g.

```auto
[{"id":"21147119.119cfe","type":"inject","z":"c791cbc0.84f648","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[\"192\", 2, 1234567890]","payloadType":"json","x":150,"y":340,"wires":[["f7f65daf.01eed8"]]},{"id":"f7f65daf.01eed8","type":"template","z":"c791cbc0.84f648","name":"","field":"topic","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"\"INSERT INTO users_connection_data (ip, connected, date) VALUES ('{{payload.0}}', {{payload.1}}, {{payload.2}});\"","output":"str","x":370,"y":340,"wires":[["611cf9ef.5e9d68"]]},{"id":"611cf9ef.5e9d68","type":"debug","z":"c791cbc0.84f648","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":600,"y":360,"wires":[]}]

```

---

<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 13:44 UTC](https://discourse.nodered.org/t/sqlite3-data-insert-problem/56075/15 "2022-01-04T13:44:21Z")

</div>

Nice solution - Unfortunatelly I would need to change my other 9 flows accordingly to accept this kind of input:

```auto
    topic: "INSERT INTO Mammut(\
    date, timeshift, leng, pcs, qop, qha, odo, qha_no_break, odo_no_break, util_abs, util_rel_break, util_rel_no_break, \
    hands_break, door_break, both_break, noth_break, hands_no_break, door_no_break, both_no_break, noth_no_break, \
    service_time_break, service_time_no_break, chart, chart_no_break, live_table) \
    VALUES (? ,? , ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);",
    payload: [
        date_end_ts, timeshift, leng, pcs_made, qop, qha, odo, qha_no_break, odo_no_break, util_abs, 
        util_rel_break, util_rel_no_break, hands_break, door_break, both_break, noth_break, hands_no_break, 
        door_no_break, both_no_break, noth_no_break, service_time_break, service_time_no_break, 
        JSON.stringify(chart_breaks), JSON.stringify(chart_no_breaks), live_table
    ]

```

Everything worked OK until I did an update - It is a bit frustrating that node-red/nodejs updates break the sqlite node...

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [4 January 2022 13:46 UTC](https://discourse.nodered.org/t/sqlite3-data-insert-problem/56075/16 "2022-01-04T13:46:50Z")

</div>

> [@nerevar](#):
>
> Yes, but I'm using a SQLite

That is indeed a valid point.  
If you look at the help text for the node it tells you how to do prepared queries

```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);

```

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [4 January 2022 14:22 UTC](https://discourse.nodered.org/t/sqlite3-data-insert-problem/56075/17 "2022-01-04T14:22:08Z")

</div>

Colin I do not see this info in the node info at node-red flows

> **[node-red-node-sqlite](https://flows.nodered.org/node/node-red-node-sqlite)**
>
> A sqlite node for Node-RED

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [4 January 2022 14:42 UTC](https://discourse.nodered.org/t/sqlite3-data-insert-problem/56075/18 "2022-01-04T14:42:53Z")

</div>

Click on the node in the flow and look in the right hand pane. Click the Book symbol at the top if necessary.

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [4 January 2022 14:48 UTC](https://discourse.nodered.org/t/sqlite3-data-insert-problem/56075/19 "2022-01-04T14:48:14Z")

</div>

Should it be in the help documentation on node-red flows and github. Seems an oversite. It's not until you install the node that you get relevant info.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [4 January 2022 15:12 UTC](https://discourse.nodered.org/t/sqlite3-data-insert-problem/56075/20 "2022-01-04T15:12:31Z")

</div>

As the powers that be will no doubt say, PRs are always welcome.

---

<div class="post-metadata">

**Author:** ![UnborN](https://avatars.discourse-cdn.com/v4/letter/u/4491bb/32.png) [@UnborN](https://discourse.nodered.org/u/UnborN)\
**Post date:** [4 January 2022 18:46 UTC](https://discourse.nodered.org/t/sqlite3-data-insert-problem/56075/21 "2022-01-04T18:46:51Z")

</div>

I did some test with the sqlite node and it seems that another way to pass parameters, that is close to your syntax, is not with the `?` but with `$`

```auto
msg.topic = `INSERT INTO test (name, surname) VALUES ($1, $2)`
msg.payload = ["John", "Smith"]
return msg;

```

Dont know if that changed with the newer version. it is possible

Do some test in one function and If it helps use Ctrl-F Find/Replace `?` with `$` and then add numbers next to them.

[Next page](https://discourse.nodered.org/t/sqlite3-data-insert-problem/56075.md?page=2)
