Hey guys, this is my first post so sorry if this is the wrong forum but im pretty sure im in the right place. I dont usually ask in forums because someone else where has already asked it but i have searched and searched and cannot find an answer that i am looking for.
In a nutshell, i have a very basic login form which is connected to a database [access 2003] and uses IF statements to match the username and passwords. here is the code :
Public Class LoginForm1
Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click
Dim con As OleDbConnection = New OleDbConnection("Provider=Microsoft.jet.oledb.4.0;data source = C:\Users\Admin\Desktop\Login\database.mdb")
Dim cmd As OleDbCommand = New OleDbCommand("SELECT username,password FROM table1 where username=? and password=?", con)
Dim read As OleDbDataReader = cmd.ExecuteReader()
If read.HasRows Then
If UsernameTextBox.Text = read.Item("username").ToString And PasswordTextBox.Text = read.Item("password").ToString Then
Label1.Text = read.Item("password").ToString
MsgBox("Login unsuccessful, username and passwords are case sensitive")
Catch ex As Exception
Now, this all works handy dandy which i was fairly chuffed at. then i thought, i might as well go all the way and encrypt it. so the plan was..
user = admin
password = 8 (inside the database) however the user chose the password 4.
when back in vb, the user enters : admin ; 4 and the program uses
"if usernametextbox.text = admin and (val(passwordtextbox.text) * 2) then form2.show
so before i go doing 128bit encryption or anything stupid.. i litrally just want to get something as simple as a multiplication password before anything more complex...
Please help me, i already have tuffs of hair missing
Thanks in advance and i apologise if i have not explained very well, i know what i want.. but not how to describe it