SQL UPDATE problem with FP database wizard

D

David Glover

I'm trying to do an SQL UPDATE on an Access database using the FP
database wizard. The database connection is working OK, using the wizard
to do lookups works fine.

The SQL query I'm putting into the wizard is:

UPDATE users SET activated = 1 WHERE (user = ::user::)

::user:: is a form field "user", which I have tried passing to the page
containing this script using both GET and POST.

However, all I get is this error:

Database Results Error
Your page contains a query with user input parameters that could not be
resolved.
This could happen if your DatabaseRegionStart webbot has an empty or
missing s-columnnames or s-columntypes attributes.
You may need to read Microsoft Knowledge Base Article 817029.

Article 817029 refers to FrontPage 2003, which I am NOT using, I'm using
FrontPage 2002, and the server is Windows 2000 SP4 running the default
FP server extensions, I haven't upgraded them.

If I change the ::user:: to "0" in the SQL string, the error goes away
but of course I get "No records returned".

Can anyone help?
 
D

David Glover

Net55 said:
post the entire page code

<!--webbot bot="DatabaseRegionStart" s-columnnames s-columntypes
s-dataconnection="sat" 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 users&lt;br&gt;SET activated =
1&lt;br&gt;WHERE user = ::user::" b-procedure="FALSE" clientside
suggestedext="asp" s-defaultfields="user=" s-norecordsfound="No records
returned." i-maxrecords="0" i-groupsize="0" botid="0"
u-dblib="_fpclass/fpdblib.inc" u-dbrgn1="_fpclass/fpdbrgn1.inc"
u-dbrgn2="_fpclass/fpdbrgn2.inc" tag="BODY" preview="&lt;table border=0
width=&quot;100%&quot;&gt;&lt;tr&gt;&lt;td bgcolor=&quot;#FFFF00&quot;
align=&quot;left&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;This is
the start of a Database Results
region.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;"
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="UPDATE users SET activated = 1 WHERE user = ::user::"
fp_sDefault="user="
fp_sNoRecords="No records returned."
fp_sDataConn="sat"
fp_iMaxRecords=0
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"-->
<!--webbot bot="DatabaseRegionStart" endspan i-CheckSum="17659"
--><!--webbot bot="DatabaseRegionEnd" b-tableformat="FALSE"
b-menuformat="FALSE" u-dbrgn2="_fpclass/fpdbrgn2.inc" i-groupsize="0"
clientside tag="BODY" preview="&lt;table border=0
width=&quot;100%&quot;&gt;&lt;tr&gt;&lt;td bgcolor=&quot;#FFFF00&quot;
align=&quot;left&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;This is
the end of a Database Results
region.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;" startspan
--><!--#include file="_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan i-CheckSum="62730" -->
 
D

David Glover

David said:
I'm trying to do an SQL UPDATE on an Access database using the FP
database wizard. The database connection is working OK, using the wizard
to do lookups works fine.

However, all I get is this error:

Database Results Error
Your page contains a query with user input parameters that could not be
resolved.
This could happen if your DatabaseRegionStart webbot has an empty or
missing s-columnnames or s-columntypes attributes.
You may need to read Microsoft Knowledge Base Article 817029.

I'm now trying to do a different SQL UPDATE query, and that isn't
working either, with this error:

Database Results Error
Unable to find operator in query string. Query string currently is
UPDATE users SET credit = credit + ::credit:: WHERE user = ::user::

It seems as if no UPDATE queries are working.

Can anyone help?
 
D

David Glover

David said:
I'm now trying to do a different SQL UPDATE query, and that isn't
working either, with this error:

Database Results Error
Unable to find operator in query string. Query string currently is
UPDATE users SET credit = credit + ::credit:: WHERE user = ::user::

Sorry to reply to myself again, but I just tried changing the query to
"SET credit = ::credit:: + credit" instead of the other way around. I'm
now back to the original error:

Database Results Error
Your page contains a query with user input parameters that could not be
resolved.
This could happen if your DatabaseRegionStart webbot has an empty or
missing s-columnnames or s-columntypes attributes.
You may need to read Microsoft Knowledge Base Article 817029.

This is maddening!
 

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