Skip to Main Content

Programming Languages & Frameworks

Announcement

For appeals, questions and feedback, please email oracle-forums_moderators_us@oracle.com

Oracle, NodeJS

user545194May 17 2023 — edited May 19 2023

Environment: Oracle 21c, OracleDB 5.5, NodeJS 18.12.1

We are developing a REST API application. So far the transactions work, however when inserting data the id is not returned on the screen.

oracldb.autoCommit = true;
...
`INSERT INTO table (data) VALUES ('something') RETURN newid INTO :id`,
...
id: { type: oracledb.NUMBER, dir: oracledb.BIND_OUT }
..
console.log(result.outBinds); <-- no output, same with console.log(result.outBinds.id);
console.log("Rows inserted: " + result.rowsAffected); <-- no output
} catch (err) {
...

Any ideas?

Comments
Post Details
Added on May 17 2023
1 comment
221 views