2021年5月6日星期四

Failed to connect to mydb.database.windows.net:1433 in 15000ms (Microsoft Azure SQL Database)

I am able to retrieve data from Microsoft Azure SQL Database using below code: -

const sql = require("mssql");    var config = {    user: "user_name",    password: "Pass@1234",    server: "mydb.database.windows.net",    database: "db_name",    options: {      enableArithAbort: true,    },    stream: true,  };    module.exports = function getQueryResult(query) {    return new Promise((res, rej) => {      sql.connect(config).then((pool) => {        pool.query(query, (err, result) => {          if (err) rej(err);          res(result);        });      });    });  };  

I am using getQueryResult function to get the data from database.

Everything is going perfect accept the thing that the below errors occurs in between.

I know this question has been asked before. But I have tried all the solutions. None of the solution was specifically for Microsoft Azure SQL Database so I thought might be there is some problem in database.

Thanks in advance.

https://stackoverflow.com/questions/67396748/failed-to-connect-to-mydb-database-windows-net1433-in-15000ms-microsoft-azure May 05, 2021 at 03:19PM

没有评论:

发表评论