1

I'm building a NodeJS app on my Mac and I need to connect to a MSSQL database.

Using the node module mssql, I'm able to connect to the server. But authentication fails because the database server requires the use of Windows Authorization or 'trustedConnection'. If I could use the Microsoft Driver for Node.js for SQL Server with mssql, I could provide a true value for 'options.trustedConnection', but that driver is Windows only.

Is there any way to do what I'm attempting? I don't see a way with the other drivers/node modules (tedious, tds, etc) to provide a connection string that would set trustedConnection to true or use Windows Authentication.

4

1 回答 1

0

我刚刚从 Ubuntu 14.04 成功连接到 SQL Server。

我使用FreeTDS作为驱动,unxiODBC作为驱动管理器,node odbc作为Node.js模块进行连接。我认为这也可以在 OSX 上使用。

更多信息可以看这个链接。我写博客,希望可以节省别人的时间。

但是我需要做更多的研究,因为我想使用这个节点模块mssql来连接。mssql 使用 tds 或 tedious 作为驱动程序。

于 2014-11-19T05:14:08.913 回答