oracle nodejs 访问

1. 下载node-oracle网址如下:

https://github.com/joeferner/node-oracle

2. 测试代码:

var oracle = require('oracle');

var connectData = {
hostname: "localhost",
port: 1521,
database: "xe", // System ID (SID)
user: "oracle",
password: "oracle"
} oracle.connect(connectData, function(err, connection) {
if (err) { console.log("Error connecting to db:", err); return; } connection.execute("SELECT systimestamp FROM dual", [], function(err, results) {
if (err) { console.log("Error executing query:", err); return; } console.log(results);
connection.close(); // call only when query is finished executing
});
});
对于详细的信息可以参考上面的网址
上一篇:netty websocket集群下遇到的问题


下一篇:Tomcat配置HTTPS方式生成安全证书