-
-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathtest_fire_native.cjs
More file actions
23 lines (22 loc) · 735 Bytes
/
Copy pathtest_fire_native.cjs
File metadata and controls
23 lines (22 loc) · 735 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
const { attach } = require('node-firebird-driver-native');
async function run() {
try {
const db = await attach({
host: '127.0.0.1',
port: 3050,
database: 'F:/Proyectos/SAI/2024LADRILLERA SAMARITNA.FDB',
username: 'SYSDBA',
password: 'masterkey'
});
const tx = await db.startTransaction();
const stmt = await db.prepare(tx, "EXECUTE BLOCK AS BEGIN POST_EVENT 'TEST_EVENT_MCP'; END");
await stmt.execute(tx);
await stmt.dispose();
await tx.commit();
await db.disconnect();
console.log("Event fired successfully via NATIVE driver");
} catch (e) {
console.error(e);
}
}
run();