d.a*_*orm 2 sql-server node.js node-mssql
我使用 SQL Server Express 2012 的命名实例如果我尝试使用 SSMS 连接到它,它可以工作,使用以下参数:
Server name: mit-007\SQLEXPRESS2012
Authentication: SQL Server Authentication
Login: sa
Password: mit
Run Code Online (Sandbox Code Playgroud)
使用节点 mssql:
var sql = require('mssql');
var config = {
user: 'sa',
password: 'mit',
server: 'mit-007',
driver: 'tedious',
database: 'Delvi',
options: {
instanceName: 'SQLEXPRESS2012'
}
};
sql.connect(config).then(function(){ // and so on
Run Code Online (Sandbox Code Playgroud)
它记录了这个错误
{ [ConnectionError: Failed to connect to mit-007:undefined in 15000ms]
name: 'ConnectionError',
message: 'Failed to connect to mit-007:undefined in 15000ms',
code: 'ETIMEOUT' }
Run Code Online (Sandbox Code Playgroud)
浏览后我解决了这个问题,这就是我所做的
我不确定上面的每一个步骤都是必要的,但它们对我有用
| 归档时间: |
|
| 查看次数: |
3555 次 |
| 最近记录: |