找回密码
 加入
搜索
查看: 1570|回复: 1

[AU3基础] 求助有关sql

[复制链接]
发表于 2010-10-1 00:44:46 | 显示全部楼层 |阅读模式
Dim $ServerIP = '127.0.0.1'
Dim $ServerID = 'sa'
Dim $ServerPWD = 'sa'
Dim $ServerDatabase = 'ECardData'

$conn = ObjCreate("ADODB.Connection")
$RS = ObjCreate("ADODB.Recordset")
$conn.Open("driver={SQL Server};server=" & $ServerIP & ";uid=" & $ServerID & ";pwd=" & $ServerPWD & ";database=" & $ServerDatabase & "")
$RS.ActiveConnection = $conn

;----------------------------查询
Dim $hardware = "dbo.tAccount"
$RS.open("select sPassword from " & $hardware);这里就自由发挥了
MsgBox(0,"返回第一行数据",$RS.Fields(0).value)



 楼主| 发表于 2010-10-1 00:45:58 | 显示全部楼层
想做个东西,就是输入sinternalid 中的数据自动读取spassword中的数据

咋写啊
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-21 20:30 , Processed in 0.072537 second(s), 22 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表