I am new to NodeJS technology, while working on nodejs project, I got below issue.
I have implemented ibm_db module (to establish DB2 connection), and using "prepared statements" to execute 'SELECT' queries. Below query is executed without errors but console.log(result) is giving result as {fetchMode : 4}, but I am expecting COLUMN_1 results here. Can someone tell me if I am missing anything here.
db.prepare('SELECT COLUMN_1 FROM TABLE_A WHERE COLUMN_2=?', function(err, stmt){
if(err){
console.log(err);
}
stmt.execute(['CA'], function(err, result){
console.log(result);
});
});
stmt.execute(['CA'], function(err, result){ console.log(err, result); });result.closeSync();