Skip to content

Instantly share code, notes, and snippets.

@askldjd
Created February 23, 2017 03:19
Show Gist options
  • Save askldjd/672c3c18f802bab6dcadf8c363e5ab5c to your computer and use it in GitHub Desktop.
Save askldjd/672c3c18f802bab6dcadf8c363e5ab5c to your computer and use it in GitHub Desktop.
var oracledb = require('oracledb');
oracledb.getConnection({
user: "USERNAME",
password: "PASSWORD",
connectString: "HOSTNAME:PORT/DATABASE_NAME"
},
function(err, connection) {
console.log('got connection', err, connection);
setInterval(function() {
if (err) { console.error(err); return; }
connection.execute("SELECT * FROM VACOLS.BRIEFF WHERE BFKEY=TO_CHAR(12345)", function(err, result) {
if (err) { console.error(err); return; }
console.log(result.rows);
});
}, 2000);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment