$Rs.Open("Select * From " & $s_Tablename & " where " & $s_FindFieldName & "='" & $s_FindData & "'")
While (Not $Rs.eof And Not $Rs.bof)
If @error = 1 Then ExitLoop
; For $x = 1 To $s_RetrunDataNum
; $Return[$x] = $o_adoRs.Fields($x).value
; Next
$Return = $Rs.Fields(0).value
$o_adoRs.movenext
WEnd
用AU3也二年了,但只是限于实用的程序范围,近日接触数据库,总是写不好,版主的程序写的不错,但我看的不太懂,能不能详细说一下啊,谢谢!
尤其是:
While (Not $Rs.eof And Not $Rs.bof)
If @error = 1 Then ExitLoop
; For $x = 1 To $s_RetrunDataNum
; $Return[$x] = $o_adoRs.Fields($x).value
; Next
$Return = $Rs.Fields(0).value
$o_adoRs.movenext
WEnd
While (Not $Rs.eof And Not $Rs.bof); 判断记录为不为空
If @error = 1 Then ExitLoop
; For $x = 1 To $s_RetrunDataNum
; $Return[$x] = $o_adoRs.Fields($x).value
; Next
$Return = $Rs.Fields(0).value;逐条记录查询,直到查到符合的记录
$o_adoRs.movenext;指针指向下一条
WEnd