Firebird.attach(options, function(err, db) { if (err) throw err; // db = DATABASE db.query('INSERT INTO USERS (ID, ALIAS, CREATED) VALUES(?, ?, ?) RETURNING ID', [1, 'Pe'ter', new Date()], function(err, result) { console.log(result[0].id); db.query('SELECT * FROM USERS WHERE Alias=?', ['Peter'], function(err, result) { console.log(result); db.detach(); }); });});