如题所述
第1个回答 2012-03-21
if conn.execute("select isnull((select 密码列 from 表 where 用户名列=用户名),'')")(0)<>用户输入的密码 then
debug.print "Error"
else
debug.print "OK"
end if
debug.print "Error"
else
debug.print "OK"
end if
第2个回答 2012-03-21
Dim ado As ADODB.Recordset
sql = "select * from test where name='" & Text1.Text & "'"
Set ado = New ADODB.Recordset
ado.Open sql, adocnn, 1, 1
If ado.Fields("PS").Value = TEXT2.Text Then MsgBox "不能和以前的密码一致!"本回答被网友采纳
sql = "select * from test where name='" & Text1.Text & "'"
Set ado = New ADODB.Recordset
ado.Open sql, adocnn, 1, 1
If ado.Fields("PS").Value = TEXT2.Text Then MsgBox "不能和以前的密码一致!"本回答被网友采纳