Click here to Skip to main content
15,070,613 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Clicking DropDownList item should do.. Pin
MatrixCoder8-May-07 10:18
MemberMatrixCoder8-May-07 10:18 
AnswerRe: Clicking DropDownList item should do.. Pin
Sherin Iranimose8-May-07 18:54
MemberSherin Iranimose8-May-07 18:54 
GeneralRe: Clicking DropDownList item should do.. Pin
porsti9-May-07 19:41
Memberporsti9-May-07 19:41 
GeneralActive Directory question Pin
Psycho-*Coder*-Extreme8-May-07 9:19
MemberPsycho-*Coder*-Extreme8-May-07 9:19 
GeneralRe: Active Directory question Pin
Dave Kreskowiak8-May-07 10:10
mveDave Kreskowiak8-May-07 10:10 
GeneralRe: Active Directory question Pin
Psycho-*Coder*-Extreme8-May-07 10:28
MemberPsycho-*Coder*-Extreme8-May-07 10:28 
GeneralRe: Active Directory question Pin
Dave Kreskowiak8-May-07 10:36
mveDave Kreskowiak8-May-07 10:36 
GeneralRe: Active Directory question Pin
Psycho-*Coder*-Extreme8-May-07 11:07
MemberPsycho-*Coder*-Extreme8-May-07 11:07 
Ok now Im frustrated WTF | :WTF:

I haver this function to search the AD

Public Shared Function IsValidADLogin(ByVal loginName As String, ByVal givenName As String) As fnStatRtn
        Dim oReturn As New fnStatRtn(True)
        Dim search As New DirectorySearcher()
        Try
            search.Filter = String.Format("(&(SAMAccountName={0})(givenName={1}))", loginName, givenName)
            search.PropertiesToLoad.Add("cn")
            search.PropertiesToLoad.Add("SAMAccountName")
            Dim result As SearchResult = search.FindOne()
            Dim samaccountname As String = CStr(result.Properties("SAMAccountName")(0))
            MsgBox(samaccountname)
            If result Is Nothing Then
                oReturn.FnCompletedSuccessfully = False
                oReturn.colReturnItems.Add("Login Name provided isnt valid. Please try again.")
            Else
                oReturn.FnCompletedSuccessfully = True
            End If
        Catch ex As Exception
            amaDBHelper.CatchErrors(oReturn, ex, "IsValidADLogin Error")
        End Try
        Return oReturn
    End Function

But when I try to msgbox the value I get a Object reference not set to an instance of an object. error.


"Okay, I give up: which is NOT a real programming language????"
Michael Bergman



"Well yes, it is an Integer, but it's a metrosexual Integer. For all we know, under all that hair gel it could be a Boolean."
Tom Welch



"Let's face it, the average computer user has the brain of a Spider Monkey."
Bill Gates


QuestionHow to make a program that is able to save data ? Pin
Me0w!8-May-07 8:13
MemberMe0w!8-May-07 8:13 
AnswerRe: How to make a program that is able to save data ? Pin
Dave Kreskowiak8-May-07 8:16
mveDave Kreskowiak8-May-07 8:16 
GeneralRe: How to make a program that is able to save data ? Pin
Me0w!8-May-07 8:58
MemberMe0w!8-May-07 8:58 
GeneralRe: How to make a program that is able to save data ? Pin
Dave Kreskowiak8-May-07 10:05
mveDave Kreskowiak8-May-07 10:05 
GeneralRe: How to make a program that is able to save data ? Pin
Me0w!8-May-07 10:21
MemberMe0w!8-May-07 10:21 
QuestionDeleting multiple rows Pin
TAK788-May-07 8:00
MemberTAK788-May-07 8:00 
AnswerRe: Deleting multiple rows Pin
Dave Kreskowiak8-May-07 8:13
mveDave Kreskowiak8-May-07 8:13 
GeneralRe: Deleting multiple rows Pin
TAK788-May-07 8:39
MemberTAK788-May-07 8:39 
GeneralRe: Deleting multiple rows Pin
TAK788-May-07 8:53
MemberTAK788-May-07 8:53 
Questionsearch hard drive for files Pin
jds12078-May-07 7:36
Memberjds12078-May-07 7:36 
AnswerRe: search hard drive for files Pin
MatrixCoder8-May-07 7:59
MemberMatrixCoder8-May-07 7:59 
AnswerRe: search hard drive for files Pin
Dave Kreskowiak8-May-07 8:10
mveDave Kreskowiak8-May-07 8:10 
GeneralRe: search hard drive for files Pin
jds12078-May-07 10:21
Memberjds12078-May-07 10:21 
GeneralRe: search hard drive for files Pin
Dave Kreskowiak8-May-07 10:32
mveDave Kreskowiak8-May-07 10:32 
GeneralRe: search hard drive for files Pin
Dave Kreskowiak8-May-07 17:24
mveDave Kreskowiak8-May-07 17:24 
GeneralRe: search hard drive for files Pin
P P Vilsad8-May-07 21:21
MemberP P Vilsad8-May-07 21:21 
AnswerRe: search hard drive for files Pin
P P Vilsad8-May-07 21:18
MemberP P Vilsad8-May-07 21:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.