0

hi anyone here knows how to validate user inputs.. when the user logs in and his/her password is in Uppercase(saved in database) but forgets to type in uppercase. and it would display warning message saying invalid password...

any help would be highly appreciated :)

5
Contributors
8
Replies
9
Views
6 Years
Discussion Span
Last Post by bLuEmEzzy
0

>>how do i change the collation
read the link provide by adatapost

Edited by Jx_Man: n/a

0

in addition, you can use string compare function.

Dim i As Integer
i = String.Compare("dani", "DaNi", False)
If i = -1 Then
   MsgBox("Different")
ElseIf i = 0 Then
   MsgBox("Same")
End If
0

i did set it to collation..i followed the procedure..

where will i put this code in my program?

Dim i As Integer
i = String.Compare("dani", "DaNi", False)
If i = -1 Then
   MsgBox("Different")
ElseIf i = 0 Then
   MsgBox("Same")
End If
0

no, that just an example code. i just show how to use string compare.
you need to modified it.

Dim i as Integer
Dim PassResult as String

PassResult = (a password taken from database, select result)
i = String.Compare(txtPassword.Text, PassResult, False) ' compare an inputed password with a password from database
If i = -1 Then
   MsgBox("Wrong Password")
ElseIf i = 0 Then
   ' same password, do anything as u wish 
End If
0
Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged
        TextBox2.Text = UCase(TextBox2.Text)
    End Sub

just make your textbox in uppercase...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.