Results 1 to 2 of 2

Thread: password encryption cannot be read..

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2011
    Posts
    19

    password encryption cannot be read..

    guys i cant get through my login window,its inorect,but i dont know what's wrong,here is the code for my login form can you help me please


    Private Sub Command1_Click()

    End Sub

    Private Sub cmdok_Click()

    Dim mPass, mEncrypt As String
    mPass = txtpassword.Text + "Password Protected"
    For i = 1 To Len(mPass)
    mEncrypt = mEncrypt + Chr(Asc(Mid(mPass, i, 1)) + 100)
    Next i


    RSconn "select * from tbluseraccess"
    With RS
    .Filter = "Username= '" & txtusername.Text & " ' " & "and password = '" & Me.txtpassword.Text & "'"
    If RS.RecordCount <> 0 Then

    RSconn "select * from tbllevel where username='" & Me.txtusername & "'"
    If RS.Fields("access_level") = "Administrator" Then
    frmadminmain.Show
    ElseIf RS.Fields("access_level") = "Faculty" Then
    frmmain.Show
    Unload Me
    End If

    Else
    MsgBox "no"
    End If

    End With



    If RS.RecordCount = 0 Then
    RSconn1 "select * from tbllock"
    RS1.Fields("Lock") = Val(RS1.Fields("Lock")) + 1
    RS1.Update

    MsgBox "Access Denied!" + vbCrLf + vbCrLf + "Invalid Username and/or Password!" + vbCrLf + vbCrLf & 3 - Val(RS1.Fields("Lock")) & "Attempt/s remaining!", vbCritical, " Login Error"

    If Val(RS1.Fields("Lock")) = 3 Then
    MsgBox "Unauthorized User! System Blocked!", vbCritical + vbOKOnly, " Warning"
    frmblockedac.Show
    End If

    Else
    RSconn1 "select * from tbllock"
    If RS1.Fields("Lock") = 0 Then



    Unload Me

    Else
    RS1.Fields("Lock") = 0
    RS1.Update



    Unload Me
    End If
    End If







    End Sub

    Private Sub Form_Load()
    Call DCN

    RSconn "select * from tbluseraccess"
    If RS.RecordCount = 0 Then
    frmregistration.Show
    Unload Me
    End If

    RSconn1 "Select * from tbllock"
    If RS1.Fields("Lock") = 3 Then
    Unload Me
    frmblocked.Show
    End If

    End Sub

  2. #2
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: password encryption cannot be read..

    Have a look in the VB6 code bank for useful examples on how to encrypt/decrypt data. You might also want to look at the Database development FAQ for some examples of saving and retrieving data from a database.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width