Firebird.attach(options, function(err, db) { if (err) throw err; // db = DATABASE db.query('SELECT * FROM TABLE', function(err, result) { // IMPORTANT: close the connection db.detach(); }); });