Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click
Try
Dim usr, pswd As String
Dim i, n As Integer
obcon.con.Open()
obcon.cmndcon()
obcon.cmnd.CommandText = "select count(*) from users "
n = obcon.cmnd.ExecuteScalar
MsgBox("n=" & n)
For i = 1 To n Step 1
obcon.cmnd.CommandText = "select usr_name from users where usr_id= " & i
If obcon.cmnd.ExecuteScalar = txtusrfrmlgn.Text Then
usr = obcon.cmnd.ExecuteScalar
MsgBox(usr)
End If
MsgBox(i)
Next
For i = 1 To n Step 1
obcon.cmnd.CommandText = "select usr_pswrd from users where usr_name='" & usr & "'"
MsgBox(txtpswdfrmlgn.UseSystemPasswordChar)
If txtpswdfrmlgn.UseSystemPasswordChar = True Then
pswd = obcon.cmnd.ExecuteScalar
MsgBox(pswd)
End If
Next
Catch ex As Exception
MsgBox(ex.Message)
Finally
obcon.con.Close()
End Try
End Sub
jaimin4829 0 Newbie Poster
Begginnerdev 256 Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.