0% found this document useful (0 votes)
95 views

Node - Js and Oracle DB - Insert Query Statement Doesn't Work - Stack Overflow PDF

Uploaded by

David Ontiveros
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
95 views

Node - Js and Oracle DB - Insert Query Statement Doesn't Work - Stack Overflow PDF

Uploaded by

David Ontiveros
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Search… Log In Sign Up

Home
Node.js and Oracle DB: Insert query statement doesn't work Ask Question

PUBLIC

I have a problem according to SQL query. My insert query returns answer that tuple is inserted asked 2 years, 11 months ago
Stack Overflow
successfully but actually there is no tuple in table. So for some reasons it doesn't work. Query:
viewed 3,288 times
Tags
1
connection.execute( active 2 years, 11 months ago
Users
"INSERT INTO "+table+
Jobs " VALUES "+
"(:0, :1, :2, :3, :4, :5, :6, :7, :8, :9, :10, :11)",
[objIns.attr1, objIns.attr2, objIns.attr3, objIns.attr4, objIns.attr5, objIns. Blog
2 function(err, result){
Teams if (err) { Predicting Stack Overflow Tags with
Q&A for work console.error("insert2",err.message); Google’s Cloud AI
callback(err.message)
} else{
Learn More Featured on Meta
console.log("Rows inserted " + result.rowsAffected);
}
}); Unicorn Meta Zoo #2: What is the role of
moderators?

Thank you. Should we burninate the [fix] tag?

**UPDATE_SOLUTION1: add to your server script: oracledb.autoCommit = true; **

**UPDATE_SOLUTION2: add { autoCommit: true } to execute() ** 71 people chatting

node.js oracle sql-insert


SQL
36 mins ago - WhatsThePoint
By using our site, you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and our Terms of Service.
share improve this question edited May 18 '16 at 21:31 asked May 15 '16 at 13:26
Tima Tru
67 4 11
Related
Generally, setting autocommit is a bad practice. I would add a commit; to your statement. – T Gray May 15 '16
at 17:31 219 Best way to do multi-row insert in Oracle?

add a comment 905 How do I limit the number of rows returned


by an Oracle query after ordering?
2 Answers active oldest votes 1004 How to get GET (query string) variables in
Express.js on Node.js?

8 Oracle equivalent of PostgreSQL


¿No encuentras la respuesta? Pregunta en Stack Overflow en español. ✕ INSERT…RETURNING *;

0 Oracle Sequence wastes/reserves values


(in INSERT SELECT)
The global oracledb.autoCommit = true can result in over-committing, which is a waste of resources
0 Insert command works in MS with Oracle
and may mean that you can't rollback to the desired data state if some part of your application fails.
Linked Server but not in Visual Basic 6
4 If you know a particular insert statement should be committed immediately, the most efficient way is 0 ORACLE DB: insert a row and return a
to add the execute() option equivalent autoCommit like: variable to a scalar query

-1 mysqli insertion query neither insert records


connection.execute( nor shows the location of error
"INSERT INTO "+table+
" VALUES "+ 0 Oracle insert architecture
"(:0, :1, :2, :3, :4, :5, :6, :7, :8, :9, :10, :11)",
[objIns.attr1, objIns.attr2, objIns.attr3, objIns.attr4, objIns.attr5, objIns 0 Insert value with select statement, or if it
{ autoCommit: true }, doesn't exist insert new value
function(err, result){
...
Hot Network Questions
And now you see it II (the B side)
If you don't want to immediately commit after an execute() you can use an explicit commit() at any
desired time later. Note that this requires a 'roundtrip' to the database server unlike the autoCommit What does the "DS" in "DS-..." US visa application
forms stand for?
options which are 'piggybacked' onto the execute() call. Unnecessary roundtrips reduce ultimate
scalability. What are the mechanical balance issues with a
playable race with more than two hands?
See the documentation: https://github.com/oracle/node- How to divide a buffer using geometry generator in
oracledb/blob/master/doc/api.md#transactionmgt QGIS 3.X

Are wands in any sort of book going to be too


share improve this answer answered May 16 '16 at 1:23 much like Harry Potter?
Christopher Jones
How is Arya still alive?
2,259 1 8 15
Generate permutations and combination for name
column
Christopher Thank you – Tima Tru May 18 '16 at 21:31
Using mean length and mean weight to calculate
add a comment mean BMI?

Why is it wrong to *implement* myself a known,


published, widely believed to be secure crypto
algorithm?

Can you turn a recording upside-down?

Comparing two values in the form (a + sqrt(b)) as


fast as possible?

Who is Rabbi Shimeon who discusses with Rabbi


Yochanan in Gemara
I don't know how node.js works, but Oracle need a commit after an insert, usually.
Why was Sam Wilson chosen for this, but not
share improve this answer Bucky?
edited May 16 '16 at 5:55 answered May 15 '16 at 14:25
2 Why is there a cap on 401k contributions?
S.Bozzoni
585 4 13
What's the difference between "ricochet" and
"bounce"?
Bless you god) it works) – Tima Tru May 15 '16 at 14:44 Why are thrust reversers not used to slow down to
taxi speeds?
add a comment
What are these round pads on the bottom of a
PCB?

Thawing Glaciers return to hand interaction


Your Answer
How did Captain Marvel know where to find this
character?

how to find out if there's files in a folder and exit


accordingly (in KSH)

Program for finding longest run of zeros from a list


of 100 random integers which are either 0 or 1

Crime rates in a post-scarcity economy

Gift for mentor after his thesis defense?

Why did Missandei say this?

question feed

Sign up or log in Post as a guest


Name
Sign up using Google

Sign up using Facebook Email


Required, but never shown

Sign up using Email and Password

Post Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged node.js oracle sql-insert or ask
your own question.

STACK OVERFLOW PRODUCTS COMPANY STACK EXCHANGE Blog Facebook Twitter LinkedIn
NETWORK
Questions Teams About
Technology
Jobs Talent Press
Life / Arts
Developer Jobs Directory Advertising Work Here
Culture / Recreation
Salary Calculator Enterprise Legal
Science
Help Privacy Policy
Other
Mobile Contact Us site design / logo © 2019 Stack Exchange Inc; user contributions
licensed under cc by-sa 3.0 with attribution required.
Disable Responsiveness rev 2019.5.8.33623

You might also like