How to connect Node.js 14 LTS to Oracle Database 12c EE using node-oracledb

Channel:
Subscribers:
5,740
Published on ● Video Link: https://www.youtube.com/watch?v=vfOGzJ7GO9s



Category:
Tutorial
Duration: 2:45
1 views
0


In this video we are going to see How to connect Node.js 14 to Oracle Database 12c EE orcl instance using node-oracledb add-on.
1. First check nodejs is available in commandline (node --version, npm --version).
2. Go to Source code directory in commandline and run "npm install oracledb".
3. Finally run the js program "node oracle12c.js"

Node.js and node-oracledb add-on can be downloaded from:

https://nodejs.org/download/release/v14.21.3/
https://github.com/oracle/node-oracledb


Below is the program to connect NodeJS to Oracle Database 12c EE orcl instance.

IMPORTANT NOTE on SOURCE CODE: only source code that are acceptable by the youtube description box will be displayed.
In this program I have replaced the angled brackets with > or <. once you copy the source code to editor replace it with greater than or less than symbols respectively.
#########################SOURCE CODE STARTS HERE##############################
const oracledb = require('oracledb');

async function run() {
let connection = await oracledb.getConnection({
user : "C##Scott",
password : "tiger",
connectString : "localhost:1521/ORCL" // [hostname]:[port]/[DB service name]
});
let query = 'SELECT * from person';

connection.execute(query, (err, rows) => {
if(err) throw err;

console.log(rows);
});
}
run();
#########################END OF SOURCE CODE##############################

#nodejs #nodejs14 #nodejstutorial #nodejsoracle #oraclenodejs #nodejsdatabase #nodeoracledb #12c #oracle




Other Videos By java frm


2023-05-02How to connect Node.js 18 LTS to Oracle Database 23c FREE using node-oracledb
2023-05-02How to connect Node.js 18 LTS to Oracle Database 19c EE using node-oracledb
2023-05-02How to connect Node.js 18 LTS to Oracle Database 12c EE using node-oracledb
2023-05-02How to install Node.js 18 LTS on Windows 10/11 from zip archive
2023-05-02How to connect Node.js 16 LTS to Oracle Database 23c FREE using node-oracledb
2023-05-02How to connect Node.js 16 LTS to Oracle Database 19c EE using node-oracledb
2023-05-02How to connect Node.js 16 LTS to Oracle Database 12c EE using node-oracledb
2023-05-02How to install Node.js 16 LTS on Windows 10/11 from zip archive
2023-05-02How to connect Node.js 14 LTS to Oracle Database 23c FREE using node-oracledb
2023-05-02How to connect Node.js 14 LTS to Oracle Database 19c EE using node-oracledb
2023-05-02How to connect Node.js 14 LTS to Oracle Database 12c EE using node-oracledb
2023-05-02How to install Node.js 14 LTS on Windows 10/11 from zip archive
2023-04-23Ubuntu Studio 23.04 Installation on VirtualBox 7.0 with Guest Additions step by step | Lunar Lobster
2023-04-23Ubuntu Desktop 23.04 Installation on VirtualBox 7.0 with Guest Additions | Lunar Lobster
2023-04-23125 Go Programs using chatGPT with verified results - 125 Golang programs with source code download
2023-04-22Fedora 38 Workstation installation on VirtualBox 7.0 with Guest Additions
2023-04-22Variable Scope in nested For Loop in Golang 1.20
2023-04-22Variable Scope in Golang 1.20
2023-04-22How to validate XML in Golang 1.20
2023-04-22How to validate JSON string in Golang 1.20
2023-04-22How to print unique numbers in array in Golang 1.20



Tags:
how to connect nodejs 14 to oracle database 12c free
how to connect nodejs to oracle database 12c
nodejs oracle database connectivity
node-oracledb add-on to connect oracle database
nodejs oracle driver
install node-oracledb module
connect oracle database with nodejs
how to connect oracle with nodejs
node.js and oracle database
node-oracle db oracle database
nodejs oracledb module
node-oracledb package for oracle database
oracle database nodejs node-oracledb