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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help? How to use ASP with alter user command.

Status
Not open for further replies.

ttheobal

Programmer
Nov 6, 2003
13
CA
I'm not sure whether this post should be in the ASP section or Oracle. I guess my question is with ASP, but it's Oracle that I'm connecting to.

I am working on a html (asp) doc that receives username and password info from a form, then connects to oracle and issues an alter command to update the password.

I got the connection to oracle to work, but My alter command doesn't work. No errors are reported either. I've attached my code below.

On Error Resume Next
objSQL = Server.CreateObject("ADODB.Command")
set objSQL.ActiveConnection = objConn
StrCommand = "alter user " & Userid & " identified by """ & NewPassword & """;"
objSQL.execute StrCommand
If objSQL.errors.count > 0 then
Response.write( objSQL.errors.count & &quot;Errors Occured while setting password&quot; & &quot;<P>&quot;)
Response.write objSQL.errors.count
For counter= 0 to objSQL.errors.count
Response.write(&quot;Error #&quot; & objSQL.errors(counter).number & &quot;<P>&quot;)
Response.write(&quot;Error desc. -> &quot; & objSQL.errors(counter).description & &quot;<P>&quot;)
Next
else
response.write(&quot;nO ERRORS&quot;)
end if

Any help is greatly appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top