Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Beginner- Could someone tell me what this error means?

Status
Not open for further replies.

sw1llam3

IS-IT--Management
Aug 28, 2002
9
US
Hello,

I do not know VBscript really at all however trying to get some code working in order to allow my users to change passwords from a web page.

This is the error I am getting...

Microsoft VBScript runtime error '800a0005'

Invalid procedure call or argument: 'GetObject'


I think the runtime error code meanss access denied, but I am not sure.

But, I definitely don't know why a GetObject call would be conidered invalid.


Any help with this woould be greatly appreciated!

 
Thanks for looking at it! Here it is...



The first ASP page 'ChangePasswordEntry' is listed here...

Language=VBScript %>

<%
dim sUser, sPassword
dim oUser, sConnectString


sUser = request(&quot;txtUserName&quot;)
sPassword = request(&quot;txtPassword&quot;)
sNewPassword = request(&quot;txtNewPassword&quot;)
sConfPassword = request(&quot;txtConfPassword&quot;)

if sUser = &quot;&quot; then Response.Redirect &quot;ChangePasswordEntry.asp&quot;

if sNewPassword <> sConfPassword then Response.Redirect &quot;BadPassword.htm&quot;

sConnectString = &quot;LDAP://CN=&quot; & sUser & &quot;, OU=users, &quot; & &quot;DC=spgrp, DC=net&quot;

Response.Write sConnectString

Response.Write &quot;<br>&quot;

Set oUser = GetObject(sConnectString)

oUser.ChangePassword sPassword, sNewPassword

Response.Write &quot;<Title> Password Changed </Title>&quot;

Response.Write &quot;<H3> &quot; & sUser & &quot;: Your password has been changed </H3> <br> <br>&quot;

Response.Write &quot;<p> Please click <a href= to return to main remote access page.</p>&quot;


set oUser = Nothing


%>

The second ASP page which is posted to by the first is this...

Language=VBScript %>

<%
dim sUser, sPassword
dim oUser, sConnectString


sUser = request(&quot;txtUserName&quot;)
sPassword = request(&quot;txtPassword&quot;)
sNewPassword = request(&quot;txtNewPassword&quot;)
sConfPassword = request(&quot;txtConfPassword&quot;)

if sUser = &quot;&quot; then Response.Redirect &quot;ChangePasswordEntry.asp&quot;

if sNewPassword <> sConfPassword then Response.Redirect &quot;BadPassword.htm&quot;

sConnectString = &quot;LDAP://CN=&quot; & sUser & &quot;, OU=users, &quot; & &quot;DC=spgrp, DC=net&quot;

Response.Write sConnectString

Response.Write &quot;<br>&quot;

Set oUser = GetObject(sConnectString)

oUser.ChangePassword sPassword, sNewPassword

Response.Write &quot;<Title> Password Changed </Title>&quot;

Response.Write &quot;<H3> &quot; & sUser & &quot;: Your password has been changed </H3> <br> <br>&quot;

Response.Write &quot;<p> Please click <a href= to return to main remote access page.</p>&quot;


set oUser = Nothing


%>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top