How to connect to SQL Server with windows authentication from Node.JS using mssql module

前端 未结 12 1385
忘掉有多难
忘掉有多难 2020-11-27 13:57

Hi I\'m unable to connect to SQL server that is using windows authentication in node js. I\'m using the mssql module. The error message is :

[ConnectionError         


        
12条回答
  •  半阙折子戏
    2020-11-27 14:29

    I struggled to connect with mssql server which run in remote windows server using windows authentication mode . Then i found the solution just used like below code.

    sql.connect("Data Source=172.25.x.x,1433;User Id=CSLx\\Name;Password=xxxxxx1234;Initial Catalog=giveTHedataabseNamel;Integrated Security=True",function(err){ }
    

提交回复
热议问题