为什么这个程序不起作用?
我想连接到外部oracle数据库
在解决这个问题之前,我解决了oracledb location和oracle client的问题,两个路径是正确的,版本是正确的
赢7 x64
```const oracledb = require('oracledb');
const mypw = 'DEMO12dscSEd3'
function getEmployee(prodid) {
return new Promise(async function(resolve, reject) {
let connection;
try {
connection = await oracledb.getConnection({
user : "DEMO",
password : "*****",
connectString : "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=84.252.140.225)
(PORT=49161))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=XE)))"
});
VS code's Terminal :
* PS C:\NodeProgram\node-oracle> node index
TypeError: oracledb.getConnection is not a function
*
暂无答案!
目前还没有任何答案,快来回答吧!