本文介绍了如何使用Atom Editor&设置查询超时数据原子?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开始将 Atom 与包 Data-Atom 用于SQL Server连接.

I'm start using Atom with the package Data-Atom for SQL Server connection.

但是执行查询时,我总是收到此错误:

But I keep getting this error when I execute a query:

但是在Visual Studio上,相同的查询没有错误地执行,因此我认为服务器是可以的.

But on Visual Studio the same query executes without errors, so the server is ok I presume.

有解决此问题的方法吗?

There is a way to resolve this?

推荐答案

更新:连接选项未传递给node-mssql,但在此PR 被合并.

Update: The connection options weren't being passed through to node-mssql but after this PR is merged they will be.

为了将超时设置为一小时,我将以下内容添加到data-atom-connections.cson.

In my attempt to set the timeout to one hour I added the below to data-atom-connections.cson.

{
    name: "sqlserver01"
    protocol: "sqlserver"
    user: "dzamo"
    password: "norton"
    server: "sqlserver01.localdomain"
    database: "AdventureWorks"

    options: "requestTimeout=36000000"
}

什么也没发生.我必须在~/.atom/packages/data-atom/node_modules/tedious/lib/connection.js中对其进行硬编码才能使长时间运行的查询起作用.我将对此进行更多调查,并在github上打开一个错误.

And nothing happened. I had to go and hardcode it in ~/.atom/packages/data-atom/node_modules/tedious/lib/connection.js to get a long-running query to work. I'll investigate this a bit more and open a bug on github.

这篇关于如何使用Atom Editor&设置查询超时数据原子?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-18 08:50