|
| |
|
|
polytrek
Posts: 2 Joined: 2/4/2008 Status: offline
|
SQL database update code in FrontPgae - 3/14/2008 13:04:25
I have been beating myself senseless trying to get this code to work, everything seems fine but I must be missing something. I keep getting the "The operation failed. If this continues, please contact your server administrator." error. {Form Page} <%
If Session("uid") = "" Then Response.Redirect "login.asp"
%>
<%
Response.Buffer = True
Response.ExpiresAbsolute = Now() - 1
Response.AddHeader "Cache-Control", "must-revalidate"
Response.AddHeader "Cache-Control", "no-cache"
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Change
my
password</title>
</head>
<body>
<form method="POST" action="confirmpasswordchange.asp">
<p>Change
my
password
to:
<br>
<input type="password" name="password" size="20"><input type="hidden" name="uid" value="<%=session("uid")%>"><input type="submit" value="Submit"></p>
</form>
</body>
</html> {Update page that gives the error} <%
If Session("uid") = "" Then Response.Redirect "login.asp"
If Session("uid") <> Request("UID") Then Response.Redirect "login.asp"
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Your
password
has
been
changed</title>
</head>
<body>
<!--#include file="_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="UPDATE Users Set Password = '::password::' WHERE ID = ::uid:: "
fp_sDefault="password=&uid="
fp_sNoRecords="Your password has been changed."
fp_sDataConn="polytrek"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&"
fp_iDisplayCols=16
fp_fCustomQuery=True
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<!--#include file="_fpclass/fpdbrgn2.inc"-->
<p><font color="#000000"><a href="login.asp">Login
as
a
different
user</a></font></p>
<p><font color="#000000"><a href="showuser.asp">Show
my
information</a></font></p>
</body>
</html> Any help on this would be greatly appreciated. Thanks.
< Message edited by rdouglass -- 3/14/2008 14:07:35 >
|
|
|
|
rdouglass
Posts: 9280 From: Biddeford, ME USA Status: offline
|
RE: SQL database update code in FrontPgae - 3/14/2008 14:06:02
quote:
fp_sQry="UPDATE Users Set Password = '::password::' WHERE ID = ::uid:: " Hi and Welcome to OutFront. Password is a Reserved Word so it may help to try it this way: fp_sQry="UPDATE Users Set [Password] = '::password::' WHERE ID = ::uid:: " That help any?
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
polytrek
Posts: 2 Joined: 2/4/2008 Status: offline
|
RE: SQL database update code in FrontPgae - 3/14/2008 20:50:40
Thank you both for the quick responses! Although I have only posted twice I have used these forums for years and continue to be amazed by the quality of the content and people providing it.
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|