db update error

A

Ale

when i try to update my access database that was made with frontpage 2003
database wizard i get this error

Database Results Wizard Error
Description: Syntax error in UPDATE statement.
Number: -2147217900 (0x80040E14)
Source: Microsoft JET Database Engine

I was told that the error was with a file called update.asp here is the code



<html>

<head>
<% ' 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>Results -- Updated Record</title>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>

<body bgcolor="#FFFFFF">
<!--webbot bot="PurpleText" PREVIEW="-Important- If you modify this
Database Results region using the Database Results Wizard, then your Database
Editor will no longer work. If you accidentally open the Database Results
Wizard, simply click Cancel to exit without regenerating the Database Results
region." -->

<script Language="JavaScript">
<!--
top.list.location.href = top.list.location.href;
// -->
</script>

<!--webbot bot="DatabaseRegionStart" s-columnnames="Key,Name,Address,Choice"
s-columntypes="3,202,203,2" s-dataconnection="up" b-tableformat="FALSE"
b-menuformat="FALSE" s-menuchoice s-menuvalue b-tableborder="TRUE"
b-tableexpand="TRUE" b-tableheader="TRUE" b-listlabels="FALSE"
b-listseparator="FALSE" i-ListFormat="0" b-makeform="FALSE" s-RecordSource
s-displaycolumns s-criteria s-order s-sql="UPDATE Results SET Name =
'::Name::' , Address = '::Address::' , Choice = ::Choice:: WHERE (Key =
::Key::)" b-procedure="FALSE" clientside SuggestedExt="asp"
s-DefaultFields="Name=&Address=&Choice=0&Key=0" s-NoRecordsFound="Record
updated in table." i-MaxRecords="1" i-GroupSize="0"
u-dblib="../../_fpclass/fpdblib.inc" u-dbrgn1="../../_fpclass/fpdbrgn1.inc"
u-dbrgn2="../../_fpclass/fpdbrgn2.inc" Tag="BODY" startspan BOTID="0"
preview="&lt;table border=0 width="100%"><tr><td bgcolor="#FFFF00"><font
color="#000000">This is the start of a Database Results region. The page must
be fetched from a web server with a web browser to display correctly; the
current web is stored on your local disk or
network.</font></td></tr></table>" --><!--#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 Name = '::Name::' , Address = '::Address::' ,
Choice = ::Choice:: WHERE (Key = ::Key::)"
fp_sDefault="Name=&Address=&Choice=0&Key=0"
fp_sNoRecords="Record updated in table."
fp_sDataConn="up"
fp_iMaxRecords=1
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&Key=3&Name=202&Address=203&Choice=2&"
fp_iDisplayCols=16
fp_fCustomQuery=True
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../../_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="11843" -->

<p><!--webbot bot="PurpleText" PREVIEW="This is the UPDATE query." --></p>
<!--webbot bot="DatabaseRegionEnd" b-tableformat="FALSE"
b-menuformat="FALSE" u-dbrgn2="../../_fpclass/fpdbrgn2.inc" i-groupsize="0"
clientside Tag="BODY" startspan preview="&lt;table border=0
width="100%"><tr><td bgcolor="#FFFF00"><font color="#000000">This is the end
of a Database Results region.</font></td></tr></table>" --><!--#include
file="../../_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan i-checksum="65064" -->

</body>

</html>
 
T

Thomas A. Rowe

Change the field named " Name" to something else, like "FullName" in the form and database. Name is
a reserve word.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
T

Thomas A. Rowe

No, but you are right in that Key is also a reserved word.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
A

ale

which field named " Name" ? or should i change any field with name in it?

also where should i make these changes in the update.asp file and in the
edit.asp file?



Change the field named " Name" to something else, like "FullName" in the
form and database. Name is
a reserve word.
 
T

Thomas A. Rowe

<!--webbot bot="DatabaseRegionStart" s-columnnames="Key,Name,Address,Choice"
Change Key and Name to other names




--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top