Click here to Skip to main content
15,901,505 members

Comments by DOZDOZ (Top 15 by date)

DOZDOZ 17-May-13 5:19am View    
@ Garth J Lancaster, it is not running the application rather the process.start(module2) will just open the folder. But,what I want to achieve is when an item of the menu is clicked the module2 application will run.
DOZDOZ 15-May-13 11:04am View    
Be explicit please for I don't understand. Thanks for your concern.
DOZDOZ 29-Apr-13 9:23am View    
You are there! Thanks a million time for your encouragements and guidelines.
DOZDOZ 29-Apr-13 4:52am View    
Watch my code below and show me the error because I've used the If ... Else ... Endif statement and it is not given me what I want. Thanks for your patience and continued help. I mean without the password, I'll be getting "user not found". What do I do?



Protected Sub btnRegister_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnRegister.Click
Try

If getOrder() = False Then Return

Dim entry As New DirectoryEntry("LDAP://10.2.0.231")
entry.Username = txtUsername.Text + "@gov.net"
entry.Password = txtPassword.Text


Dim searcher As New DirectorySearcher("(&(objectCategory=Person)(objectClass=User))")

searcher.SearchRoot = entry
searcher.PropertiesToLoad.Add("cn")
' searcher.PropertiesToLoad.Add("Mail")

Dim result As SearchResult

searcher.Filter = "(mail=FIRS\" & txtEmail.Text & "@gov.net)"

result = searcher.FindOne()

If result Is Nothing Then
lblMsg.Text = "Username not found!"
Else
Dim sql As String = "INSERT INTO Table (Role,Username,Unit,Rank) VALUES ( '" & _
ddlRole.Text & "','" & txtUsername.Text.Replace("'", "''") & "','" & _ ddlUnit.Text & "','" & ddlRank.Text & "')"

Dim gentool As New functions
If gentool.ExecuteDatabase(sql) = True Then
lblMsg.Text = "Registered successfully"
goClear()
Else
lblMsg.Text = "User already exists"
End If
End If


Catch ex As Exception
' lblMsg.Text = "Either e-mail or password or both is/are not in the AD" 'ex.Message
End Try

End Sub
DOZDOZ 26-Apr-13 3:37am View    
Dave, please tell me where because I've tried but to no avail. Looking forward to recieving your help. It is holding me for two weeks now.