Node.js Oracle数据库连接错误:错误:类型错误:Oracle.getconnection不是函数
获取错误 错误:TypeError:oracle.getconnection不是函数 显示: 看起来你把getconnection错拼成了小写的cNode.js Oracle数据库连接错误:错误:类型错误:Oracle.getconnection不是函数,node.js,oracle,selenium-webdriver,npm,protractor,Node.js,Oracle,Selenium Webdriver,Npm,Protractor,获取错误 错误:TypeError:oracle.getconnection不是函数 显示: 看起来你把getconnection错拼成了小写的c export class DBConnect { databaseConnection() { let connection; const oracle = require('oracledb'); try { connection = oracle.getconnection({ user : 'u
export class DBConnect {
databaseConnection() {
let connection;
const oracle = require('oracledb');
try {
connection = oracle.getconnection({
user : 'user',
password : 'password',
connectString : 'connectString'
});
connection.execute('Select * from table',
function (err, result) {
console.log(result.rows);
});
} catch
(err) {
console.log('Error :' + err);`enter code here`
}
}
}
connection = await oracledb.getConnection(dbConfig);