Skip to content

net.isIP is not a function #516

Closed
Closed
@goldjay

Description

@goldjay

Trying to connect a locally-running application to a remote ms sql database using the following standard code.
The error is coming from connector.js line 31. Are they any more dependencies I would need to install?

var sql = require('mssql');

var config = {
  user: '*******',
  password: '******',
  server: '****',
  database: '**',
  port: 1433
};

// connect to your database

sql.connect(config).then(() => {
return sql.queryselect * from TestTable
}).then(result => {
console.log(result);
}).catch(err => {
// ... error checks
console.log("Connection Error");
console.log(err);
})

sql.on('error', err => {
// ... error handler
console.log(err);
})
sql.close();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions