View Single Post
  #2 (permalink)  
Old July 8th, 2003, 05:12 AM
bveerendrakumar bveerendrakumar is offline
Authorized User
Join Date: Jul 2003
Location: Hyderabad, Andhra Pradesh, India.
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts

Do the following

1. Substitute ur values at #places(For ex: if ur field name in databse is usrPwd then replace rs("Fieldname#").value as rs("usrpwd").value

2. Assume that ur passwd field text box name is txtPasswd

Private Function FindUser() as Boolean
    dim Cn as new Adodb.connection
    dim Rs as recordset"Dsn=#;Uid=#;Pwd=#;")
    set rs=new recordset"Sqlstatement#",cn,adopenstatic,adlockopti mistic)
    if trim(txtPasswd.text)=rs("Fieldname#").value then
if cn.state then 'checking the connection wether it is opened
end if
set cn=nothing
if rs.state then
end if
set rs=nothing
exit funtion
   msgbox err.description
end function

'Call this function from ur valid events to check wether pwd is correct or not, if password exists it returns true else it returns false

Hope this solution help you