steveg
Posts: 274 Joined: 10/20/2004 Status: offline
|
Database Update Problem - 6/25/2008 5:30:14
I have done this a few times before but I guess I must be missing something this time!! I am getting a database update error message: Database Results Error The operation failed. If this continues, please contact your server administrator. Here is the code for the update form (where I do my editing) <html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<% ' FP_ASP -- ASP Automatically generated by a Frontpage Component. Do not Edit.
FP_CharSet = "windows-1252"
FP_CodePage = 1252 %>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>
<body>
<!--webbot bot="DatabaseRegionStart" s-columnnames="ID,ItemPosition,ItemDate,ItemTitle,ItemContent,ItemActive,Remote_computer_name,User_name,Browser_type,Timestamp" s-columntypes="3,202,202,202,203,202,202,202,202,135" s-dataconnection="walker" b-tableformat="FALSE" b-menuformat="FALSE" s-menuchoice s-menuvalue b-tableborder="TRUE" b-tableexpand="TRUE" b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE" i-listformat="7" b-makeform="TRUE" s-recordsource="Results" s-displaycolumns="ID,ItemPosition,ItemDate,ItemTitle,ItemContent,ItemActive" 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="0" 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" align="left"><font color="#000000">This is the start of a Database Results region.</font></td></tr></table>" 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="walker"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=1
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&ID=3&ItemPosition=202&ItemDate=202&ItemTitle=202&ItemContent=203&ItemActive=202&Remote_computer_name=202&User_name=202&Browser_type=202&Timestamp=135&"
fp_iDisplayCols=6
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../../_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="16271" --><form METHOD="POST" action="update.asp">
<p>
<!--webbot bot="PurpleText" preview="Set this form's properties so it submits user input to the appropriate page." --></p>
<table BORDER="0">
<tr>
<td><b>ID:</b></td>
<td>
<input TYPE="TEXT" NAME="ID" SIZE="40" VALUE="<%=FP_FieldHTML(fp_rs,"ID")%>"></td>
</tr>
<tr>
<td><b>ItemPosition:</b></td>
<td>
<input TYPE="TEXT" NAME="ItemPosition" SIZE="40" VALUE="<%=FP_FieldHTML(fp_rs,"ItemPosition")%>"></td>
</tr>
<tr>
<td><b>ItemDate:</b></td>
<td>
<input TYPE="TEXT" NAME="ItemDate" SIZE="40" VALUE="<%=FP_FieldHTML(fp_rs,"ItemDate")%>"></td>
</tr>
<tr>
<td><b>ItemTitle:</b></td>
<td>
<input TYPE="TEXT" NAME="ItemTitle" SIZE="40" VALUE="<%=FP_FieldHTML(fp_rs,"ItemTitle")%>"></td>
</tr>
<tr>
<td><b>ItemContent:</b></td>
<td>
<input TYPE="TEXT" NAME="ItemContent" SIZE="40" VALUE="<%=FP_FieldHTML(fp_rs,"ItemContent")%>"></td>
</tr>
<tr>
<td><b>ItemActive:</b></td>
<td>
<input TYPE="TEXT" NAME="ItemActive" SIZE="40" VALUE="<%=FP_FieldHTML(fp_rs,"ItemActive")%>"></td>
</tr>
<tr>
<td COLSPAN="2"><br>
<input TYPE="submit" NAME="fp_submit" value="Update"><input TYPE="Reset" NAME="fp_reset"></td>
</tr>
</table>
</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" align="left"><font color="#000000">This is the end of a Database Results region.</font></td></tr><TR><TD ALIGN=LEFT 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="65064" --></body></html> Here is the code for the update file (to post the data to the database) <html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<% ' FP_ASP -- ASP Automatically generated by a Frontpage Component. Do not Edit.
FP_CharSet = "windows-1252"
FP_CodePage = 1252 %>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>
<body>
<table width="100%" border="1">
<thead>
</thead>
<tbody>
<!--webbot bot="DatabaseRegionStart" s-columnnames s-columntypes s-dataconnection="walker" 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="TRUE" s-recordsource s-displaycolumns s-criteria s-order s-sql="UPDATE RESULTS<br>SET ItemTitle='%%ItemTitle%%',<br>ItemContent='%%ItemContent%%',<br>ItemDate='%%ItemDate%%',<br>ItemActive='%%ItemActive%%',<br>ItemPosition='%%ItemPosition%%'<br>WHERE ID='%%ID%%'<br>" b-procedure="FALSE" clientside suggestedext="asp" s-defaultfields s-norecordsfound="No records returned." i-maxrecords="256" 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" align="left" width="100%"><font color="#000000">This is the start of a Database Results region.</font></td></tr>" 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 ItemTitle='%%ItemTitle%%', ItemContent='%%ItemContent%%', ItemDate='%%ItemDate%%', ItemActive='%%ItemActive%%', ItemPosition='%%ItemPosition%%' WHERE ID='%%ID%%' "
fp_sDefault=""
fp_sNoRecords="<tr><td colspan=16 align=left width=""100%"">No records returned.</td></tr>"
fp_sDataConn="walker"
fp_iMaxRecords=256
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="54952" --><!--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" align="left" 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="65064" --></tbody>
</table>
</body>
</html> I asume that it is something really stupid but I am just not seeing it. Steve
|