Sql server 是否使用自动热键连接到Microsoft SQL Server?
我有一个每天运行的ahk脚本,但首先,我必须在运行查询后将数据硬编码到其中。是否可以通过自动热键连接到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
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