-
Hey, again me 👋 But the last one is reading from another SQlite database (code below): try {
} catch(e) { In destination I'm inserting to local SQLite tabel (code below): `var dbConn;
} finally { But this code is keep on returning "field id unknown", or pushing just raw variable to database instead of it's data. How should I change my channel. And this code, should add data to JSON, but in database Iam getting just '${additionalObject}' variable. `
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Build your SQL statement in a variable then put that variable in the channelMap. Then you can see the exact SQL you created and can cut and paste it to your SQL tool and execute it to verify your syntax. Comment out the actual execute query command while you test building the query string. You can of course logger.info(query). But that gets lost in the console log. Also this syntax is a bit easier, thanks to @tonygermano for showing me this a long time ago. BE CAREFUL about single quotes in the value of your variables with this.
Best practices would dictate paramterized db call, but I'll leave that be for now. |
Beta Was this translation helpful? Give feedback.
-
This discussion was answered in the thread of messages, however no particular item was tagged as the exact answer by the orginal poster. Original poster changed thread topics at the end. |
Beta Was this translation helpful? Give feedback.
This discussion was answered in the thread of messages, however no particular item was tagged as the exact answer by the orginal poster. Original poster changed thread topics at the end.