[VB6 ] 帳號密碼連結資料庫的問題
程式碼如下
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
推
06/14 20:46, , 1F
06/14 20:46, 1F
推
06/14 20:56, , 2F
06/14 20:56, 2F
Visual_Basic 近期熱門文章
PTT數位生活區 即時熱門文章