Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sql-server/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql server 是否使用自动热键连接到Microsoft SQL Server?_Sql Server_Autohotkey - Fatal编程技术网

Sql server 是否使用自动热键连接到Microsoft SQL Server?

Sql server 是否使用自动热键连接到Microsoft SQL Server?,sql-server,autohotkey,Sql Server,Autohotkey,我有一个每天运行的ahk脚本,但首先,我必须在运行查询后将数据硬编码到其中。是否可以通过自动热键连接到SQL Server?这显然是理想的。我读过几篇文章,但到目前为止还没有成功 我尝试了下面的示例逻辑,但没有成功 谢谢 ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=True;User ID=user;Password=pw;Initial Catalog=db;Data Source=server;Use Proce

我有一个每天运行的ahk脚本,但首先,我必须在运行查询后将数据硬编码到其中。是否可以通过自动热键连接到SQL Server?这显然是理想的。我读过几篇文章,但到目前为止还没有成功

我尝试了下面的示例逻辑,但没有成功

谢谢

ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=True;User ID=user;Password=pw;Initial Catalog=db;Data Source=server;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Use Encryption for Data=False;Tag with column collation when possible=False"
Query := "select * from tbl"
Table := ADOSQL(ConnectionString, Query)
Loop % Table.MaxIndex() - 1 ; We subtract 1 in order to skip one row (which will be the column titles, as we are adding 1 to the counter below).
{
     CURRENT_ROW := A_Index + 1 ; We add one to our current row counter in order to start on row 2 (skip row 1).
     Loop % Table[CURRENT_ROW].MaxIndex()
     {
          CURRENT_COLUMN := A_Index
          msgbox % Table[CURRENT_ROW, CURRENT_COLUMN]
     }
}

你的标题让我想象出了像
:*:FROM::DROP TABLE
这样的hijinks。你的标题让我想象出了像
:*:FROM::DROP TABLE