è¿ä¸ªæ¯ä¸ä¸ªç级èè¯ç³»ç»ç»å½çé¢
Private Sub _Command1_0_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles _Command1_0.Click
Dim strSQL As String
Dim cn As New adodb.connection
Dim rs As New adodb.recordset
cn.ConnectionString = "Provider=sqloledb;Data Source=pmserver;Initial Catalog=northwind;User Id=sa;Password=sa; "
cn.open()
rs.CursorLocation = adUseClient
strSQL = "select å¯ç from 表 where ç»å½å= ' " & txtUserID.Text & " ' "
rs.Open(strSQL, cn, adOpenStatic, adLockReadOnly)
If rs.recordcount = 0 Then
MsgBox( "ç¨æ·åä¸æ£ç¡® ")
Else
if rs.fields[0].value = txtPwd.text then
MsgBox( "ç»å½æå ")
Else
MsgBox( "å¯ç é误 ")
End If
End If
End Sub
温馨提示:答案为网友推荐,仅供参考