G
G
Gleb Lukashonok2021-08-06 21:49:41
firebird
Gleb Lukashonok, 2021-08-06 21:49:41

How to get all the data from a table?

Good afternoon. Is there anyone who works with Firebird from NodeJS? There is a DB with the following tables: 610d83da5d6c9049542710.png
I should deduce all fields of the COMPUTERS table. Here is my code:

const Firebird = require('node-firebird')

let options = {}
options.host = '127.0.0.1'
options.port = 3050
options.database = `${__dirname}/Global.fdb`
options.user = 'SYSDBA'
options.password = 'masterkey'

let computers = Firebird.attach(options, function (err, db) {
  if (err) throw err
  db.query('SELECT * FROM COMPUTERS', (err, result) => {
    console.log(result)
    db.detach()
  })
})

console.log(computers)

I'm not strong in the database ... Tell me, please, how to do this?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question