A
A
Andrey Puzov2015-02-26 13:29:10
firebird
Andrey Puzov, 2015-02-26 13:29:10

How to connect to a running firebird database using node.js?

Good afternoon.
I am writing for the first time on node.js
, connecting to the firebird database. it is possible to get the number of records, everything works.
but if this database is open in IBExpert, for example, then an error occurs when opening the file.
Is it possible and how to connect to an open 24/7 database (the ultimate task is to display the lines added online in a certain table. The lines are added when a pass is applied to the turnstile - maybe only if you write a trigger to that database? and then somehow you can listen to the reaction to its operation?) ?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Viktor Koltcov, 2015-02-26
@Vityarik

What is the connection error?
Try in IBExpert menu Services-> Base per barrel

A
Andrey Puzov, 2015-02-26
@puzzlo

[Error: I/O error during "CreateFile (open)" operation for file "D:\PROGR\BD_FOR_NODE\REMOT\T.GDB", Error while trying to open file]
d:\progr\bd_for_node\remot\index. js:20
if (err) throw console.log(err);
^
undefined
Process finished with exit code 1
crate file is open, as I understand it, it happens here:

<b>firebird.attach(fbOptions, function(err, db)</b> {
    if (err) throw console.log(err);
    db.query('SELECT COUNT(*) FROM PERS', function(err, result) {
        console.log(result);
        db.detach();
    });
});

ps I am using the node-firebird module
---------------------------------------------------- -------------------------------------------------- --------------
removed registration information from IBExpert and added again. everything worked.
so I thought to myself.
thank.

S
shavluk, 2015-03-08
@shavluk

Most likely 2 instances of the server are running or connection via embed + server

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question