Click here to Skip to main content
15,913,758 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Clicking DropDownList item should do.. Pin
MatrixCoder8-May-07 10:18
MatrixCoder8-May-07 10:18 
AnswerRe: Clicking DropDownList item should do.. Pin
Sherin Iranimose8-May-07 18:54
Sherin Iranimose8-May-07 18:54 
GeneralRe: Clicking DropDownList item should do.. Pin
porsti9-May-07 19:41
porsti9-May-07 19:41 
GeneralActive Directory question Pin
Psycho-*Coder*-Extreme8-May-07 9:19
Psycho-*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
Psycho-*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
Psycho-*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
Me0w!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
Me0w!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
Me0w!8-May-07 10:21 
QuestionDeleting multiple rows Pin
TAK788-May-07 8:00
TAK788-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
TAK788-May-07 8:39 
GeneralRe: Deleting multiple rows Pin
TAK788-May-07 8:53
TAK788-May-07 8:53 
Questionsearch hard drive for files Pin
jds12078-May-07 7:36
jds12078-May-07 7:36 
AnswerRe: search hard drive for files Pin
MatrixCoder8-May-07 7:59
MatrixCoder8-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
jds12078-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
P P Vilsad8-May-07 21:21 
AnswerRe: search hard drive for files Pin
P P Vilsad8-May-07 21:18
P 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.