Добавить
Уведомления

How to connect Node.js 18 LTS to Oracle Database 23c FREE using node-oracledb

In this video we are going to see How to connect Node.js 18 to Oracle Database 23c FREE 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 oracle23c.js" Node.js and node-oracledb add-on can be downloaded from: https://nodejs.org/download/release/v18.16.0/ https://github.com/oracle/node-oracledb Below is the program to connect NodeJS to Oracle Database 23c FREE 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/FREE" // [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 #nodejs18 #nodejstutorial #nodejsoracle #oraclenodejs #nodejsdatabase #nodeoracledb #23c #oracle

12+
17 просмотров
2 года назад
12+
17 просмотров
2 года назад

In this video we are going to see How to connect Node.js 18 to Oracle Database 23c FREE 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 oracle23c.js" Node.js and node-oracledb add-on can be downloaded from: https://nodejs.org/download/release/v18.16.0/ https://github.com/oracle/node-oracledb Below is the program to connect NodeJS to Oracle Database 23c FREE 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/FREE" // [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 #nodejs18 #nodejstutorial #nodejsoracle #oraclenodejs #nodejsdatabase #nodeoracledb #23c #oracle

, чтобы оставлять комментарии