需要在AutoIt中执行SQL查询
我想在 AutoIt 中进行数据库操作。我为它编写了一些代码,但它不起作用:
Global $adCN
$adCN = ObjCreate ("ADODB.Connection") ; <== Create SQL connection
$adCN.Open ("DRIVER={SQL Server};SERVER=sqlstaging;DATABASE=NivioAsia2;uid=niviodbstaging;pwd=niviodbstaging;") ; <== Connect with required credentials
if @error Then
MsgBox(0, "ERROR", "Failed to connect to the database")
Exit
Else
MsgBox(0, "Success!", "Connection to database successful!")
EndIf
$sQuery = "select * from irws_m_users where n_userid=10318583224314"
$adCN.Execute($sQuery)
$adCN.Close ; ==> Close the database
Exit
How can I get data from table using AutoIt?
I want to do database operations in AutoIt. I written some code for it, but it is not working:
Global $adCN
$adCN = ObjCreate ("ADODB.Connection") ; <== Create SQL connection
$adCN.Open ("DRIVER={SQL Server};SERVER=sqlstaging;DATABASE=NivioAsia2;uid=niviodbstaging;pwd=niviodbstaging;") ; <== Connect with required credentials
if @error Then
MsgBox(0, "ERROR", "Failed to connect to the database")
Exit
Else
MsgBox(0, "Success!", "Connection to database successful!")
EndIf
$sQuery = "select * from irws_m_users where n_userid=10318583224314"
$adCN.Execute($sQuery)
$adCN.Close ; ==> Close the database
Exit
How can I get data from table using AutoIt?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
现在已经完成了...
It's done now...