Below is the code:
----------------
<% option explicit %>
<html>
<head>
<title>Main Page</title>
<style>
.mystyle {font-family:tahoma,serif;font-size:10pt}
</style>
</head>
<body>
<!--#include file="strConnect.asp"--> 'basic access server connection
<br><br><br><br>
<table align=center cellpadding=2 cellspacing=0><tr><td bgcolor="#333333">
<table align=center cellpadding=0 cellspacing=0 width=190>
<tr><td bgcolor="#000000"><div align="center" style="color:white" class="mystyle"><b>Main Page: </b></div></td></tr>
<tr><td bgcolor="#CCCCCC">
<br>
<blockquote>
<div align="center" class="mystyle">
<%
dim myname, myoldpassword, mynewpassword, conntemp, rstemp, sqltemp, levelcase, linklevel
myname=request.form("username"
myoldpassword=request.form("oldpassword"
mynewpassword=request.form("newpassword"
set conntemp=server.createobject("adodb.connection"
set rstemp=server.createobject("adodb.recordset"
conntemp.open strConnect
rstemp.open "users", conntemp
sqltemp="select * from users where user = '"& myname &"' ;"
set rstemp=conntemp.execute(sqltemp)
If rstemp.eof then %>
We dont have a user named <% ="<i>" & Ucase(myname) & "</i>" %>
on file! <br><br>
<a href='changepass.asp'>Try again</a>
<br><br>
<% response.end
end if
if rstemp("password".Value=myoldpassword then
rstemp("password".Value=mynewpassword
rstemp.Update
response.write "Password Changed!<br><br><a href='login.asp'>Log in</a><br><a href='index.asp'>Main Page</a><br><br>"
else %>
Passwords Don't Match <br><br>
<a href='changepass.asp'>Try again</a>
<br><br>
<% response.end
end if
rstemp.close
conntemp.close
set rstemp=nothing
set conntemp=nothing
%>
</div>
</blockquote>
</td></tr>
</table>
</td></tr></table>
</body>
</html>
-----------------
I am recieving the error:
800a0cb3 -
Object or provider is not capable of performing requested operation.
-line 53
This code takes three inputs from a previous form...
username
old password
new password
... in which I am attempting to have the code change the "password" field in the database to the new password placed in variable "myNewPassword"
I have bolded line 53 so it can be easily noticed.
This line is attempting to store the new password into the "password" field in the database.
I don't know why asp is having a problem with this line of code. I also don't know if it could be an error within the rest of the code that may be setting off that error.
So if someone could tell me how to fix this error it would be of much help.
Thanks in advance,
Bobby Gordon
----------------
<% option explicit %>
<html>
<head>
<title>Main Page</title>
<style>
.mystyle {font-family:tahoma,serif;font-size:10pt}
</style>
</head>
<body>
<!--#include file="strConnect.asp"--> 'basic access server connection
<br><br><br><br>
<table align=center cellpadding=2 cellspacing=0><tr><td bgcolor="#333333">
<table align=center cellpadding=0 cellspacing=0 width=190>
<tr><td bgcolor="#000000"><div align="center" style="color:white" class="mystyle"><b>Main Page: </b></div></td></tr>
<tr><td bgcolor="#CCCCCC">
<br>
<blockquote>
<div align="center" class="mystyle">
<%
dim myname, myoldpassword, mynewpassword, conntemp, rstemp, sqltemp, levelcase, linklevel
myname=request.form("username"
myoldpassword=request.form("oldpassword"
mynewpassword=request.form("newpassword"
set conntemp=server.createobject("adodb.connection"
set rstemp=server.createobject("adodb.recordset"
conntemp.open strConnect
rstemp.open "users", conntemp
sqltemp="select * from users where user = '"& myname &"' ;"
set rstemp=conntemp.execute(sqltemp)
If rstemp.eof then %>
We dont have a user named <% ="<i>" & Ucase(myname) & "</i>" %>
on file! <br><br>
<a href='changepass.asp'>Try again</a>
<br><br>
<% response.end
end if
if rstemp("password".Value=myoldpassword then
rstemp("password".Value=mynewpassword
rstemp.Update
response.write "Password Changed!<br><br><a href='login.asp'>Log in</a><br><a href='index.asp'>Main Page</a><br><br>"
else %>
Passwords Don't Match <br><br>
<a href='changepass.asp'>Try again</a>
<br><br>
<% response.end
end if
rstemp.close
conntemp.close
set rstemp=nothing
set conntemp=nothing
%>
</div>
</blockquote>
</td></tr>
</table>
</td></tr></table>
</body>
</html>
-----------------
I am recieving the error:
800a0cb3 -
Object or provider is not capable of performing requested operation.
-line 53
This code takes three inputs from a previous form...
username
old password
new password
... in which I am attempting to have the code change the "password" field in the database to the new password placed in variable "myNewPassword"
I have bolded line 53 so it can be easily noticed.
This line is attempting to store the new password into the "password" field in the database.
I don't know why asp is having a problem with this line of code. I also don't know if it could be an error within the rest of the code that may be setting off that error.
So if someone could tell me how to fix this error it would be of much help.
Thanks in advance,
Bobby Gordon