navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

SQL database update code in FrontPgae

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> SQL database update code in FrontPgae
Page: [1]
 
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.

(in reply to polytrek)
Spooky

 

Posts: 26606
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: SQL database update code in FrontPgae - 3/14/2008 17:10:40   
Also check this post for code problems :

http://www.frontpagewebmaster.com/m-175524/tm.htm

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to rdouglass)
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.

(in reply to Spooky)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> SQL database update code in FrontPgae
Page: [1]
Jump to: 1





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