VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Search record with the specific Critirea Using Stored Procedure With SQLServer...

by ROY LUCMAN (Philippines) (1 Submission)
Category: Databases/Data Access/DAO/ADO
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Mon 26th August 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Search record with the specific Critirea Using Stored Procedure With SQLServer...

Rate Search record with the specific Critirea Using Stored Procedure With SQLServer...



Sub FindPassWord()
On Error GoTo akomess
    
    PassFound = False
    ' Open recordset with data from Employee table.
    DE.StrdProcSearchPassword Me.TxtLoginName, Me.TxtPassword
    With DE.rsStrdProcSearchPassword
        If .RecordCount Then
           If Not .EOF Then
              .MoveFirst
              Do While Not .EOF
                 PassFound = True
                 UserCode = !UserCode
                 UserName = !UserName
                 UserPassword = !userpass
                 UserDept = !department
                 Exit Do
              Loop
           End If
        End If
    End With
    DE.rsStrdProcSearchPassword.Close
    Exit Sub
    
akomess:
    If Err.Number = 3021 Then
       DE.rsStrdProcSearchPassword.Close
    Else
       Resume Next
    End If
End Sub

'Command Button
Private Sub CmdGo_Click()
    Me.MousePointer = 11
    'Finding Password
    FindPassWord
    Me.MousePointer = 0
    Me.Refresh
    If PassFound = True Then
       Unload Me
       FrmMain.SetFocus
    Else
       MsgBox "Access Denied...", vbCritical, "Message : Error Access"
       Me.TxtLoginName.SetFocus
    End If
End Sub

Download this snippet    Add to My Saved Code

Search record with the specific Critirea Using Stored Procedure With SQLServer... Comments

No comments have been posted about Search record with the specific Critirea Using Stored Procedure With SQLServer.... Why not be the first to post a comment about Search record with the specific Critirea Using Stored Procedure With SQLServer....

Post your comment

Subject:
Message:
0/1000 characters