app-oracle.js
function oracledb(){
var oracledb = require('oracledb');
oracledb.getConnection(
{
user : "fundsdev",
password : "fundsdev",
connectString : "10.6.10.141/fundsdev"
},
function(err, connection)
{
if (err) {
console.error(err.message);
return;
}
connection.execute(
"SELECT * from sys_middle sys_middleprice_num orderby middleprice_date desc",
[0],
function(err, result)
{
if (err) {
console.error(err.message);
return;
}
console.log(result.rows);
return result.rows;
});
});
}
exports.orcl = oracledb;
app.js
app.get('/orcl',function(req, res, next){
var result = oracleop.orcl();
res.send(result);
});
这里是报错
The specified procedure could not be found. D:\mircospider\node_modules\oracledb\build\Release\oracledb.node
The specified procedure could not be found. D:\mircospider\node_modules\oracledb\build\Release\oracledb.node
Error: The specified procedure could not be found.
D:\mircospider\node_modules\oracledb\build\Release\oracledb.node
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (D:\mircospider\node_modules\oracledb\lib\oracledb.js:23:15)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
node-gyp rebuild 模块了 还是报错 个人能力有限(其实是菜)求解决思路