node.js - 用nodejs 的mssql模块去执行存储过程,可是存储过程还没全部执行完,连接就关闭了,咋办?
PHP中文网
PHP中文网 2017-04-17 15:53:23
0
1
701

用nodejs 的mssql模块去执行存储过程,可是存储过程还没全部执行完,连接就关闭了,咋办?
提示的错误:ConnectionError: Connection is closed.

var config={
    user:'sa',
    password:'xxxxx',
    server:'xxxx', 
    database:'xxxx',
    port:'xxxx',
    connectionTimeout:300000
};
我的配置写这样,还需要添加什么吗?
加了个连接操时的时间,还是不行啊,以下是错误..
ConnectionError: Connection is closed.
at d:\Program Files\nodejs\node_global\node_modules\mssql\lib\main.js:1663:17
at nextTickCallbackWith0Args (node.js:420:9)
at process._tickCallback (node.js:349:13)
PHP中文网
PHP中文网

认证高级PHP讲师

reply all(1)
Peter_Zhu

Add this connectionTimeout:60000 to the configuration

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template