| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.tools -> No response from oracle adodb call that updates User Password via an Alter User Command.
I have coded an asp module that allows a user to change their password. It is called by another module that passes the Userid and Passwords. I am running into a problem where the code works 4 times consecutively and hangs on the subsequent fifth run.
I am looking for some suggestion as to what syntax or coding sequence error
that I made:
Thank you in advance: lyndonj_at_execpc.com
Here is the asp code:
<%@ LANGUAGE="VBSCRIPT" %>
<%
'---------------------------------------------------------------------------
' PassChangeProcess ' This page does the actual changing of the RCS password ' Called from PassChange.asp '---------------------------------------------------------------------------
<%
Dim strSQL
Dim objRs
dim objFSO
DIM objTStream
Dim ForReading
Dim strFileName
DIM UserID, strDSN
dim strDSNa
Dim objConn
Dim cmdTemp
Dim rsPassChange
Dim strNewPass
Dim strUserId, strPrevPass
strNewPass = Request.Form("txtNewPass")
strUserId = Request.Form("txtOldPass")
strPrevPass = Request.Form("txtPrevPass")
'response.write "UserId " & strUserId & "<BR>"
'response.write "stroldpass " & strPrevPass & "<BR>"
'response.write "strNewPass " & strNewPass
On Error Resume Next
'DEVELOPMENT ENVIROMENT 'strFilename = "e:\dsstools\security\security.ini" 'PRODUCTION ENVIROMENT 'strFilename = "e:\MSTR6\security\security.ini" 'PERSONAL ENVIROMENT
'Session("strMessage") = strDSNa
IF lcase(strUserId) = lcase(Userid) then
'---------------------------------------------------------------------------
'Open Database Connection
'---------------------------------------------------------------------------
'OpenConnection
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open strDSNa
If Err.Number <> 0 Then
'---------------------------------------------------------------------------
----
'Close Database Connection
'---------------------------------------------------------------------------
----
objConn.Close
Session("strMessage") = "Your Old password is invalid - please try
again. Contact your " & _
"account coordinator at M&I Data Services if you continue to have
problems."
Else
'---------------------------------------------------------------------------
----
'Update User Password
'---------------------------------------------------------------------------
----
Set cmdTemp = Server.CreateObject("ADODB.Command")
Set rsPassChange = Server.CreateObject("ADODB.Recordset")
cmdTemp.CommandText = "ALTER USER " & strUserId & " IDENTIFIED BY " &
strNewPass & ""
cmdTemp.CommandType = 1
Set cmdTemp.ActiveConnection = objConn
rsPassChange.Open cmdTemp, , 1, 3, 1
If Err.Number <> 0 Then
Session("strMessage") = "Your new password was invalid - please try a
different password." & _
" Contact your account coordinator at M&I Data Services if you
continue to experience problems."
'---------------------------------------------------------------------------routine
----
'Close Database Connection - must be in the "If" and the "Else" to avoid Err.number being reset 'to zero by the On Error Resume Next command in the CloseConnection
'---------------------------------------------------------------------------
----
ELSE objConn.CommitTrans Session("strMessage") = "Your new password is set" END IF objConn.Close rsPassChange.Close End If
![]() |
![]() |