Closed juniorabranches closed 6 years ago
There are a few problems here:
Hi, thanks for the reply. but this was deconfiguration of google translator rsrs my code is this:
import {sqlanywhere} from 'sqlanywhere'
var conn_params = { Server: 'BDINTESIG_ABRANCHES', DatabaseFile: 'BDINTESIG.db', Host: 'localhost:2638', UserId: 'JOAO', Password: '123' };
var conn = this.sql.createConnection ();
conn.connect (conn_params, function (err) {
if (err) throw err;
conn.exec ('SELECT user FROM tbgersenha WHERE name =?', ['JOAO'], function (err, result) {
if (err) throw err;
console.log ('Nome:', result [0] .user);
conn.disconnect ();
})
});
Thanks!!
OK, so points 1 and 3 of my first response are not relevant. But you still need to make the change in point 2.
I come across this error .. "Cannot read property '1' of null" What can it be?
my code:
import {sqlanywhere} from 'sqlanywhere' var conn_params = { Server: 'BDINTESIG_ABRANCHES', DatabaseFile: 'BDINTESIG.db', Host: 'localhost: 2638', UserId: 'USER', Password: 'PASSWORD' };
var conn = this.sql.createConnection (); conn.connect (conn_params, function (err) { if (err) throw err; conn.exec ('SELECT user FROM tbgersenha WHERE name =?', ['AUTOR'], function (err, result) { if (err) throw err; console.log ('NamShaha:', result [0] .asha); conn.disconnect (); }) });