|
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)
|
|