select * from where sex=(case when 男 then 1 else 0 end)
Dim r As New ADODB.Recordset Set r = Data.rsadmin r.Open If Text1.Text = "" Or Text1.Text <> r("password") Then MsgBox "Your password is wrong ", vbQuestion, "error" Else If Text2.Text = "" Or Text3.Text = "" Or Text2.Text <> Text3.Text Then MsgBox "your new password is not correct ", vbQuestion, "error" Else While Not r.EOF Data.Con.Execute "update admin set password='" & Text3.Text & "'" r.MoveNext Wend End If End If r.Close Set r = Nothing 这个SQL语句有问题吗?(Data.Con.Execute "update admin set password='" & Text3.Text & "'")
Set r = Data.rsadmin
r.Open
If Text1.Text = "" Or Text1.Text <> r("password") Then
MsgBox "Your password is wrong ", vbQuestion, "error"
Else
If Text2.Text = "" Or Text3.Text = "" Or Text2.Text <> Text3.Text Then
MsgBox "your new password is not correct ", vbQuestion, "error"
Else
While Not r.EOF
Data.Con.Execute "update admin set password='" & Text3.Text & "'"
r.MoveNext
Wend
End If
End If
r.Close
Set r = Nothing
这个SQL语句有问题吗?(Data.Con.Execute "update admin set password='" & Text3.Text & "'")