Hi there again
I am working on a project in asp.net I want to retrieve users, password, and country from database
This is for recovery the password using username and secret code
Add username in text box
Add code in text box and get the password on a label
This is for asp net and window forms
Private Sub Get_Data()
Dim ConnStr As String = ConfigurationManager.ConnectionStrings("MySQLConnect").ConnectionString
Using Conn As New MySqlConnection(ConnStr)
' Select from Tbl_Users WHERE Password = 3 <------ what this mean
Using Cmd As MySqlCommand = New MySqlCommand("SELECT Password FROM tbl_users WHERE Password = 3")
Cmd.CommandType = CommandType.Text
Cmd.Connection = Conn
Conn.Open()
Using sdr As MySqlDataReader = Cmd.ExecuteReader()
If sdr.Read() Then
Reset_Lbl_Password.Text = sdr("Password").ToString()
'TxtBox_Secret_Code.Text = sdr("Password").ToString()
'txtCountry.Text = sdr("Country").ToString()
Else
Reset_Lbl_Password.Text = "Nothing was Found"
End If
End Using
Conn.Close()
Conn.Dispose()
End Using
End Using
End Sub