I am new to firebird database.
I have created a database "a" and a table "STUDENT".
I am trying to connect to the database using this npm package https://www.npmjs.com/package/node-firebird
Following is my code to connect to db and get data.
var Firebird = require('node-firebird');
var options = {};
options.host = '127.0.0.1:c:\a.fdb';
options.port = 3050;
options.database = 'a';
options.user = 'SYSDBA';
options.password = 'sa123';
options.role = null; // default
options.pageSize = 4096; // default when creating database
app.get('/', function(request, response) {
Firebird.attach(options, function(err, db) {
if (err)
console.log(err);//her i get error
db.query('SELECT * FROM student', function(err, result) {
console.log(result);
db.detach();
});
});
});
I am using flameRobin. Following are my database properties
I get following error in node console.
{ [Error: getaddrinfo ENOTFOUND 127.0.0.1:c:a.fdb 127.0.0.1:c:a.fdb:3050]
code: 'ENOTFOUND',
errno: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: '127.0.0.1:c:a.fdb',
host: '127.0.0.1:c:a.fdb',
port: 3050 }
help me.