一执行后就不动了??求解
sql = "select * from information "
rs_settlement.Open sql, conn, adOpenKeyset, adLockPessimistic
While (rs_settlement.EOF = False)
If (Trim(rs_settlement.Fields(1)) = Trim(txtcar.Text)) And (rs_settlement.Fields(6) = 0) Then
rs_settlement.Fields(5) = Now()
rs_settlement.Fields(9) = usermi
rs_settlement.Update
var = rs_settlement.Fields(3)
time = rs_settlement.Fields(4)
time1 = rs_settlement.Fields(5)
var1 = DateDiff( "m ", time, time1)
Else
rs_settlement.MoveNext
End If
Wend
执行后.也就没有反应了.不知道怎么回事??麻烦看一下是什么问题??
[解决办法]
修改
sql = "select * from information where 字段2= ' " & Trim(txtcar.Text)) & " ' and 字段7=0 "
其中字段2,7 你要修改为真实的字段名