Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var oracledb=require('oracledb');
- oracledb.getConnection(
- {
- user:'ehzawad',
- password:'ehzawad',
- connectString:'localhost/XE',
- },
- function(err,connection)
- {
- if(err)
- {
- throw err;
- console.log("database connection failed");
- }
- else
- {
- console.log("database connected");
- //module.exports=connection;
- connection.execute('select * from emp',function(err,result){
- console.log(result.length+ " "+typeof result);
- console.log(result.rows.length);
- });
- }
- }
- );
Add Comment
Please, Sign In to add comment