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

Microsoft MVP

 

trying to update access db record from frontpage form

 
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 >> trying to update access db record from frontpage form
Page: [1]
 
elvanace

 

Posts: 2
Joined: 5/7/2008
Status: offline

 
trying to update access db record from frontpage form - 5/7/2008 13:31:46   
I am trying to retrieve a list of records, modify a field, then save the record back to the db.
I have read the article from Microsoft (http://support.microsoft.com/kb/240090)and tried it, but it doesn't work.
I have read and tried the article from FrontpageMagic (http://www.frontpagemagic.com/DRW/Add-Edit-Delete/EditRecord/index.asp), but I can't get it to work either.
In both cases, I enter data into the form, and press submit to update the db, but the page just goes back to the way it was before a typed anything, and the db doesn't get updated. I don't get any error message.

I'm out of ideas. HELP!
crosscreek

 

Posts: 89
Joined: 2/5/2008
Status: offline

 
RE: trying to update access db record from frontpage form - 5/8/2008 22:39:00   
You may want to post the code (that's relevant to the updating)

This way someone can help you out better.

probably better if you ask this question in the ASP & Database section.

(in reply to elvanace)
elvanace

 

Posts: 2
Joined: 5/7/2008
Status: offline

 
RE: trying to update access db record from frontpage form - 5/9/2008 10:35:34   
Here's the code for the form where the change is entered:
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>lastname</title>
</head>

<body>

<p> </p>
<!--webbot bot="DatabaseRegionStart" s-columnnames="ID,lastname,firstname,phone,email,Remote_computer_name,User_name,Browser_type,Timestamp" s-columntypes="3,202,202,202,202,202,202,202,135" s-dataconnection="aspsample" b-tableformat="FALSE" b-menuformat="FALSE" s-menuchoice="lastname" s-menuvalue="lastname" b-tableborder="TRUE" b-tableexpand="TRUE" b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE" i-listformat="7" b-makeform="FALSE" s-recordsource="Results" s-displaycolumns="lastname,firstname,phone,email,ID" s-criteria s-order s-sql="SELECT * FROM Results" b-procedure="FALSE" clientside suggestedext="asp" s-defaultfields s-norecordsfound="No records returned." i-maxrecords="256" i-groupsize="1" botid="1" u-dblib="../_fpclass/fpdblib.inc" u-dbrgn1="../_fpclass/fpdbrgn1.inc" u-dbrgn2="../_fpclass/fpdbrgn2.inc" tag="BODY" preview="<table border=0 width="100%"><tr><td bgcolor="#FFFF00"><font color="#000000">This is the start of a Database Results region.</font></td></tr></table>" b-UseDotNET="FALSE" CurrentExt sa-InputTypes b-DataGridFormat="FALSE" b-DGridAlternate="TRUE" sa-CritTypes b-WasTableFormat="FALSE" startspan --><!--#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="SELECT * FROM Results"
fp_sDefault=""
fp_sNoRecords="No records returned."
fp_sDataConn="aspsample"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=1
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice="lastname"
fp_sMenuValue="lastname"
fp_sColTypes="&ID=3&lastname=202&firstname=202&phone=202&email=202&Remote_computer_name=202&User_name=202&Browser_type=202&Timestamp=135&"
fp_iDisplayCols=5
fp_fCustomQuery=False
BOTID=1
fp_iRegion=BOTID
%>
<!--#include file="../_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-CheckSum="50" --><form METHOD="POST" action="update.asp">
<!--webbot bot="PurpleText" preview="Set this form's properties so it submits user input to the appropriate page." --><table BORDER="0">
<tr>
<td><b>lastname:</b></td>
<td>
<input TYPE="TEXT" NAME="lastname" SIZE="40" VALUE="<%=FP_FieldHTML(fp_rs,"lastname")%>"></td>
</tr>
<tr>
<td><b>firstname:</b></td>
<td>
<input TYPE="TEXT" NAME="firstname" SIZE="40" VALUE="<%=FP_FieldHTML(fp_rs,"firstname")%>"></td>
</tr>
<tr>
<td><b>phone:</b></td>
<td>
<input TYPE="TEXT" NAME="phone" SIZE="40" VALUE="<%=FP_FieldHTML(fp_rs,"phone")%>"></td>
</tr>
<tr>
<td><b>email:</b></td>
<td>
<input TYPE="TEXT" NAME="email" SIZE="40" VALUE="<%=FP_FieldHTML(fp_rs,"email")%>"></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td COLSPAN="2"><br>
<input TYPE="Submit" NAME="fp_submit"><input TYPE="Reset" NAME="fp_reset"></td>
</tr>
</table>
<input type="hidden" name="ID" value="ID">
</form>
<hr>
<!--webbot bot="DatabaseRegionEnd" b-tableformat="FALSE" b-menuformat="FALSE" u-dbrgn2="../_fpclass/fpdbrgn2.inc" i-groupsize="1" clientside tag="BODY" preview="<table border=0 width="100%"><tr><td bgcolor="#FFFF00"><font color="#000000">This is the end of a Database Results region.</font></td></tr><TR><TD VALIGN=MIDDLE><NOBR><INPUT TYPE=Button VALUE=" |< "><INPUT TYPE=Button VALUE=" < "><INPUT TYPE=Button VALUE=" > "><INPUT TYPE=Button VALUE=" >| "> [1/1]</NOBR><BR></td></tr></table>" startspan --><!--#include file="../_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan i-CheckSum="56926" --></body></html>

Code for the page that is supposed to make the change to the db:
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>

<body>

<p> </p>
<table width="100%" border="1">
<thead>
</thead>
</table>
<table width="100%" border="1">
<thead>
</thead>
<tbody>
<!--webbot bot="DatabaseRegionStart" s-columnnames s-columntypes s-dataconnection="aspsample" b-tableformat="TRUE" b-menuformat="FALSE" s-menuchoice s-menuvalue b-tableborder="TRUE" b-tableexpand="TRUE" b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE" i-listformat="0" b-makeform="FALSE" s-recordsource s-displaycolumns s-criteria s-order s-sql="UPDATE Results<br>SET Firstname='::firstname::'<br>,Lastname='::lastname::'<br>,Phone='::phone::',<br>Email='::email::'<br>WHERE ID= ::ID::" b-procedure="FALSE" clientside suggestedext="asp" s-defaultfields="firstname= &amp;lastname= &amp;phone= &amp;email= &amp;ID=1" s-norecordsfound="No records returned." i-maxrecords="1" i-groupsize="0" botid="0" u-dblib="../_fpclass/fpdblib.inc" u-dbrgn1="../_fpclass/fpdbrgn1.inc" u-dbrgn2="../_fpclass/fpdbrgn2.inc" tag="TBODY" preview="<tr><td colspan=64 bgcolor="#FFFF00" width="100%"><font color="#000000">This is the start of a Database Results region.</font></td></tr>" b-UseDotNET="FALSE" CurrentExt sa-InputTypes b-DataGridFormat="FALSE" b-DGridAlternate="TRUE" sa-CritTypes b-WasTableFormat="TRUE" startspan --><!--#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 Results SET Firstname='::firstname::' ,Lastname='::lastname::' ,Phone='::phone::', Email='::email::' WHERE ID= ::ID::"
fp_sDefault="firstname= &lastname= &phone= &email= &ID=1"
fp_sNoRecords="<tr><td colspan=16 align=""LEFT"" width=""100%"">No records returned.</td></tr>"
fp_sDataConn="aspsample"
fp_iMaxRecords=1
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
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"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="17986" --><!--webbot bot="DatabaseRegionEnd" b-tableformat="TRUE" b-menuformat="FALSE" u-dbrgn2="../_fpclass/fpdbrgn2.inc" i-groupsize="0" clientside tag="TBODY" preview="<tr><td colspan=64 bgcolor="#FFFF00" width="100%"><font color="#000000">This is the end of a Database Results region.</font></td></tr>" startspan --><!--#include file="../_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan i-checksum="56926" --></tbody>
</table>
<table width="100%" border="1">
<tbody>
</tbody>
</table>

</body>

</html>

I'll be grateful for any help you can give me.

(in reply to elvanace)
jgeatty

 

Posts: 197
Joined: 10/14/2004
Status: offline

 
RE: trying to update access db record from frontpage form - 5/12/2008 15:17:24   
You're not passing your record ID to the update page. Also try putting the DRW code on a diet to clean it up a little...

(in reply to elvanace)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> trying to update access db record from frontpage form
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