New Page 1

 

Search


Advanced Search

Main Menu

Top Posters

1 SHYAMLAL 741
2
Albins
525
3 waxon 178
4
binoyxj
157
5 harish 156
6 anus 150
7 boby 147
8
NinethSens
130
9 manikantan 129
10
theOne
106

Who's Online
7 user(s) are online (6 user(s) are browsing Forum)

Members: 0
Guests: 7

more...

New Members

sanoj9746 2010/9/5
stellustvm 2010/9/3
fjoson3 2010/9/3
Vzard 2010/8/31
ANEESHC007 2010/8/31
farookms 2010/8/29
deepuv 2010/8/26
sakeeb1 2010/8/26
prv10 2010/8/26
simongbo 2010/8/17

Browsing this Thread:   1 Anonymous Users





CHANGE PASSWORD FORM CODE
Quite a regular
Joined:
5/24 9:59
From ACE,GVR
Group:
Registered Users
Posts: 53
Level : 6
HP : 25 / 128
MP : 17 / 108
EXP : 12
Offline
Private Sub cmdCancel_Click()
Unload Me
End Sub

Private Sub cmdOK_Click()
If ValidPassword() = True And ConfirmPWD(txtNewPWD.Text, txtConfirmPWD.Text) = True Then
UpdateNew_Password
Else
MsgBox "Password Mismatch", vbExclamation
End If
End Sub

Private Sub Form_Load()
txtUserName.Text = CURR_USER.USER_NAME
End Sub

Function ValidPassword() As Boolean
Dim recPWD As New ADODB.Recordset
recPWD.Open "SELECT username,password,user_category FROM Users WHERE username='" & txtUserName.Text & "' AND password='" & txtCurrentPWD.Text & "'", ACECON, adOpenDynamic, adLockOptimistic
If recPWD.BOF = True Or recPWD.EOF = True Then
ValidPassword = False
Else
If StrComp(recPWD.Fields("password").Value, txtCurrentPWD.Text, vbBinaryCompare) = 0 Then
ValidPassword = True
Else
ValidPassword = False
End If
End If
recPWD.Close
Set recPWD = Nothing
End Function

Function ConfirmPWD(strPWD1 As String, strPWD2 As String) As Boolean
If StrComp(strPWD1, strPWD2, vbBinaryCompare) = 0 Then
ConfirmPWD = True
Else
ConfirmPWD = False
End If
End Function

Sub UpdateNew_Password()
Dim strUpd As String
strUpd = "UPDATE Users SET password='" & txtConfirmPWD.Text & "' WHERE Username='" & txtUserName.Text & "';"
If MsgBox("Are you sure to change the password ?", vbQuestion + vbYesNo, "Change password") = vbYes Then
ACECON.Execute strUpd
End If
End Sub
-----------------------------------------------------------
Code :Jaweed (More info pls Contact)

Posted on: 5/27 23:18
Transfer the post to other applications Transfer






You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.

[Advanced Search]




 

Login

Username:

Password:


Lost Password?

Register now!

Register

    
New Page 1

 

  
New Page 1

hardware topics

 
 
CopyRight © 2006-2007.   Powered by WebCreations