
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
node-adodb-electronfork
Advanced tools
一个用 Node.js 实现的 windows 上的 ADODB 协议。
'use strict';
const ADODB = require('node-adodb');
const connection = ADODB.open('Provider=Microsoft.Jet.OLEDB.4.0;Data Source=node-adodb.mdb;');
// 不带返回的执行
connection
.execute('INSERT INTO Users(UserName, UserSex, UserAge) VALUES ("Newton", "Male", 25)')
.then(data => {
console.log(JSON.stringify(data, null, 2));
})
.catch(error => {
console.error(error);
});
// 带返回标识的执行
connection
.execute('INSERT INTO Users(UserName, UserSex, UserAge) VALUES ("Newton", "Male", 25)', 'SELECT @@Identity AS id')
.then(data => {
console.log(JSON.stringify(data, null, 2));
})
.catch(error => {
console.error(error);
});
// 带返回的查询
connection
.query('SELECT * FROM Users')
.then(data => {
console.log(JSON.stringify(data, null, 2));
})
.catch(error => {
console.error(error);
});
// 带字段描述的查询
connection
.schema(20)
.then(schema => {
console.log(JSON.stringify(schema, null, 2));
})
.catch(error => {
console.error(error);
});
'use strict';
const ADODB = require('node-adodb');
const connection = ADODB.open('Provider=Microsoft.Jet.OLEDB.4.0;Data Source=node-adodb.mdb;');
async function query() {
try {
const users = await connection.query('SELECT * FROM Users');
console.log(JSON.stringify(users, null, 2));
} catch (error) {
console.error(error);
}
}
query();
ADODB.open(connection): ADODB
初始化数据库链接参数。
ADODB.query(sql): Promise
执行有返回值的 SQL 语句。
ADODB.execute(sql[, scalar]): Promise
执行无返回值或者带更新统计的的 SQL 语句。
ADODB.schema(type[, criteria][, id]): Promise
查询数据库架构信息。参考: OpenSchema
设置环境变量
DEBUG=ADODB。参考: debug
该类库理论支持 Windows 平台下所有支持 ADODB 连接的数据库,只需要更改数据库连接字符串即可实现操作!
数据库连接字符串:
- Access 2000-2003 (*.mdb):
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=node-adodb.mdb;- Access > 2007 (*.accdb):
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=adodb.accdb;Persist Security Info=False;或者Provider=Microsoft.ACE.OLEDB.15.0;Data Source=adodb.accdb;Persist Security Info=False;
该类库需要系统支持 Microsoft.Jet.OLEDB.4.0,对于 Windows XP SP2 以上系统默认支持,其它需要自己升级,具体操作过程请参考: 如何获取 Microsoft Jet 4.0 数据库引擎的最新 Service Pack
FAQs
A Node.js JavaScript Client implementing the ADODB protocol.
We found that node-adodb-electronfork demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.