Results 1 to 7 of 7

Thread: you know this error code? 80004005

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2003
    Posts
    599

    you know this error code? 80004005

    run time error "-2147467259" (80004005)
    unspecified error...

    VB Code:
    1. Public Function createuseraccount()
    2.     Dim userobj As IADs
    3.    
    4.     Set domainobj = GetObject("WinNT://localhost")
    5.     Set userobj = domainobj.Create("User", "mason")
    6.     userobj.SetPassword "mason"
    7.     userobj.FullName = "mason"
    8.     userobj.Description = "mason account"
    9.     userobj.SetInfo
    10.    
    11.     Set userobj = Nothing
    12.  
    13. End Function

    1.) this error occurs when the userobj,setinfo is issued.. why?

    2.) and another thing,
    GetObject("WinNT://DOMAIN")

    but i change to the following

    GetObject("WinNT://localhost")

    * It wont be a problem right, cause the local machine dont have a domain.. its a workgroup only.. please guide me.. thank you
    Last edited by vbnew; Aug 25th, 2004 at 09:25 PM.
    Thank You

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2003
    Posts
    599

    Thumbs up

    Whoooly Cow.. |!! i got it.. thanks anyway... .
    Thank You

  3. #3
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901
    to help others with the same problem, please post solution, or show code.

  4. #4
    PowerPoster Deepak Sakpal's Avatar
    Join Date
    Mar 2002
    Location
    Mumbai, India
    Posts
    2,424
    i am interested too

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2003
    Posts
    599
    Apology guys.. (Deepak Sakpal and dglienna)

    i was too excited already... alright here is the solution ...


    VB Code:
    1. Public Function createuseraccount()
    2.     Dim userobj As IADs
    3.    
    4.     Set domainobj = GetObject("WinNT://<DOMAINNAME>")
    5.     Set userobj = domainobj.Create("User", "mason")
    6.     userobj.SetPassword "mason"
    7.     userobj.FullName = "mason"
    8.     userobj.Description = "mason account"
    9.     userobj.SetInfo    
    10.     Set userobj = Nothing
    11.  
    12. End Function



    that's the way to do it.. previously i use localhost... which is wrong.. change it to your machine domain... then everything is swift....
    Thank You

  6. #6
    PowerPoster Deepak Sakpal's Avatar
    Join Date
    Mar 2002
    Location
    Mumbai, India
    Posts
    2,424
    r u reffering any dlls

  7. #7
    Frenzied Member Robbo's Avatar
    Join Date
    Jan 2001
    Location
    Bradford
    Posts
    1,143
    the error, is it cant connect, either already open or it isnt there
    -----------------------------------------------
    "The hall is rented,"
    "the orchestra is engaged,"
    "its now time to see if you can dance!"
    Q, Q-Who, Star Trek The Next Generation
    -----------------------------------------------
    General Work day

    -----------------------------------------------
    DOS, Win 95, Win 98 SE, Win ME, Win NT 4.0 SP6a, Windows 2000 SP3, Window XP SP1, Windows 7, Windows 8/8.1, Windows 10, Office 97 Pro, Office 2000 Pro, Office 2010, Office 2013, Office 2016, Office 2019, Visual Basic 6 (SP5), SQL, Oracle

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width