|
-
Aug 25th, 2004, 09:11 PM
#1
Thread Starter
Fanatic Member
you know this error code? 80004005
run time error "-2147467259" (80004005)
unspecified error...
VB Code:
Public Function createuseraccount()
Dim userobj As IADs
Set domainobj = GetObject("WinNT://localhost")
Set userobj = domainobj.Create("User", "mason")
userobj.SetPassword "mason"
userobj.FullName = "mason"
userobj.Description = "mason account"
userobj.SetInfo
Set userobj = Nothing
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
-
Aug 25th, 2004, 11:44 PM
#2
Thread Starter
Fanatic Member
-
Aug 25th, 2004, 11:50 PM
#3
to help others with the same problem, please post solution, or show code.
-
Aug 26th, 2004, 12:30 AM
#4
i am interested too
-
Aug 26th, 2004, 12:59 AM
#5
Thread Starter
Fanatic Member
Apology guys.. (Deepak Sakpal and dglienna)
i was too excited already... alright here is the solution ...
VB Code:
Public Function createuseraccount()
Dim userobj As IADs
Set domainobj = GetObject("WinNT://<DOMAINNAME>")
Set userobj = domainobj.Create("User", "mason")
userobj.SetPassword "mason"
userobj.FullName = "mason"
userobj.Description = "mason account"
userobj.SetInfo
Set userobj = Nothing
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....
-
Aug 26th, 2004, 01:02 AM
#6
-
Aug 26th, 2004, 04:30 AM
#7
Frenzied Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|