作者nej (没有名字的游者)
看板Visual_Basic
标题[VB6 ] 帐号密码连结资料库的问题
时间Wed Jun 14 20:41:21 2006
程式码如下
criteria = "帐号=" & " '" & Text1.Text & "'"
criteria2 = "密码=" & " '" & Text2.Text & "'"
ret = FindFirst(Adodc1.Recordset, criteria)
ret2 = FindFirst(Adodc1.Recordset, criteria2)
If Not ret Then
MsgBox "帐号错误~您没有使用权限"
Text1.Text = Clear
Text2.Text = Clear
Text1.SetFocus
Text3.Text = Clear
ElseIf Not ret2 Then
MsgBox "密码错误~您没有使用权限"
Text2.Text = Clear
Text2.SetFocus
Text3.Text = User
Else
bOK = True
Me.Hide
End If
不过会有个问题= = 假设有帐号A 帐号B 密码A 密码B
如果我输入帐号A 密码B 也会登入成功
请教一下criteria要怎麽修改才对?
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 220.129.93.56
1F:推 fumizuki:请find 帐号=xxx and 密码=xxx 不要分开来find 06/14 20:46
2F:推 nej:可是我写在同一个criteria的话 变成不管怎麽输入都错误= =" 06/14 20:56