DataBase results Error continued

  • Thread starter Art - Lost in databases
  • Start date
A

Art - Lost in databases

What I dont understand is that my query and output uses
the exact field names that exist in the SQL table.

So my query still looks like this and I dont see any
differences. I have never had this problem before with
other ASP pages using DRW, even using more complex queries
and filed names not the same


<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>Company</title>
</head>

<body>

<form BOTID="0" METHOD="POST" ACTION="fax-test.asp">
<table BORDER="0">
<tr>
<td><b>Zip</b></td>
<td><input TYPE="TEXT" NAME="Zip" VALUE="<%=Request
("Zip")%>" size="20"></td>
</tr>
</table>
<p><br>
<input TYPE="Submit"><input TYPE="Reset"><!--webbot
bot="SaveAsASP" clientside suggestedext="asp" preview=" " -
-></p>
<p>&nbsp;</p>
</form>
<table width="100%" border="1">
<thead>
<tr>
<td><b>ID</b></td>
<td><b>Company</b></td>
<td><b>Location</b></td>
<td><b>Address</b></td>
<td><b>City</b></td>
<td><b>State</b></td>
<td><b>Zip</b></td>
<td><b>Telephone</b></td>
<td><b>Facsimile</b></td>
</tr>
</thead>
<tbody>
<!--webbot bot="DatabaseRegionStart" s-
columnnames="ID,Company,Location,Address,City,State,Zip,Tel
ephone,Facsimile" s-
columntypes="3,200,200,200,200,200,200,200,200" s-
dataconnection="faxfinder" 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="tblFaxList" s-
displaycolumns="ID,Company,Location,Address,City,State,Zip,
Telephone,Facsimile" s-criteria="[Zip] EQ {Zip} +" s-order
s-sql="SELECT * FROM tblFaxList WHERE (Zip = '::Zip::')"
b-procedure="FALSE" clientside suggestedext="asp" s-
defaultfields="Zip=00000" 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="TBODY"
preview="&lt;tr&gt;&lt;td colspan=64
bgcolor=&quot;#FFFF00&quot; align=&quot;left&quot;
width=&quot;100%&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;" 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 tblFaxList WHERE (Zip = '::Zip::')"
fp_sDefault="Zip=00000"
fp_sNoRecords="<tr><td colspan=9 align=left
width=""100%"">No records returned.</td></tr>"
fp_sDataConn="faxfinder"
fp_iMaxRecords=0
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_iDisplayCols=9
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-
checksum="22618" --><tr>
<td>
<!--webbot bot="DatabaseResultColumn" s-
columnnames="ID,Company,Location,Address,City,State,Zip,Tel
ephone,Facsimile" s-column="ID" b-tableformat="TRUE" b-
hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat
preview="&lt;font size=&quot;-
1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;ID&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"
startspan --> said:
<td>
<!--webbot bot="DatabaseResultColumn" s-
columnnames="ID,Company,Location,Address,City,State,Zip,Tel
ephone,Facsimile" s-column="Company" b-tableformat="TRUE"
b-hashtml="FALSE" b-makelink="FALSE" clientside b-
MenuFormat preview="&lt;font size=&quot;-
1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Company&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"
startspan --> said:
<td>
<!--webbot bot="DatabaseResultColumn" s-
columnnames="ID,Company,Location,Address,City,State,Zip,Tel
ephone,Facsimile" s-column="Location" b-tableformat="TRUE"
b-hashtml="FALSE" b-makelink="FALSE" clientside b-
MenuFormat preview="&lt;font size=&quot;-
1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Location&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"
startspan --> said:
<td>
<!--webbot bot="DatabaseResultColumn" s-
columnnames="ID,Company,Location,Address,City,State,Zip,Tel
ephone,Facsimile" s-column="Address" b-tableformat="TRUE"
b-hashtml="FALSE" b-makelink="FALSE" clientside b-
MenuFormat preview="&lt;font size=&quot;-
1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Address&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"
startspan --> said:
<td>
<!--webbot bot="DatabaseResultColumn" s-
columnnames="ID,Company,Location,Address,City,State,Zip,Tel
ephone,Facsimile" s-column="City" b-tableformat="TRUE" b-
hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat
preview="&lt;font size=&quot;-
1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;City&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"
startspan --> said:
<td>
<!--webbot bot="DatabaseResultColumn" s-
columnnames="ID,Company,Location,Address,City,State,Zip,Tel
ephone,Facsimile" s-column="State" b-tableformat="TRUE" b-
hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat
preview="&lt;font size=&quot;-
1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;State&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"
startspan --> said:
<td>
<!--webbot bot="DatabaseResultColumn" s-
columnnames="ID,Company,Location,Address,City,State,Zip,Tel
ephone,Facsimile" s-column="Zip" b-tableformat="TRUE" b-
hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat
preview="&lt;font size=&quot;-
1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Zip&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"
startspan --> said:
<td>
<!--webbot bot="DatabaseResultColumn" s-
columnnames="ID,Company,Location,Address,City,State,Zip,Tel
ephone,Facsimile" s-column="Telephone" b-
tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
clientside b-MenuFormat preview="&lt;font size=&quot;-
1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Telephone&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"
startspan --> said:
<td>
<!--webbot bot="DatabaseResultColumn" s-
columnnames="ID,Company,Location,Address,City,State,Zip,Tel
ephone,Facsimile" s-column="Facsimile" b-
tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
clientside b-MenuFormat preview="&lt;font size=&quot;-
1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Facsimile&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"
startspan --> said:
</tr>
<!--webbot bot="DatabaseRegionEnd" b-
tableformat="TRUE" b-menuformat="FALSE" u-
dbrgn2="_fpclass/fpdbrgn2.inc" i-groupsize="0" clientside
tag="TBODY" preview="&lt;tr&gt;&lt;td colspan=64
bgcolor=&quot;#FFFF00&quot; align=&quot;left&quot;
width=&quot;100%&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;"
startspan --><!--#include file="_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan i-
checksum="62730" --></tbody>
</table>

</body>

</html>





Subject: Database Results Error
From: "Nicholas" <[email protected]>
Sent: 9/9/2004 9:51:32 AM




What it boils down to is that FP uses only one SQL
statement to put results into the table created by DRW.
If you try to use different columns, it tries to write an
overcomplicated SQL statement that doesn't work.

The stuff that displays in the FP DRW and in the Normal
view are contained in the grayed out "DatabaseRegionStart"
area in the HTML view.

s-criteria="[Zip] EQ {Zip} +" s-order
s-sql="SELECT * FROM Results WHERE (Zip = '::Zip::')
ORDER BY Company"
b-procedure="FALSE" clientside SuggestedExt="asp"
s-DefaultFields="Zip="

The actual query that runs is in the ASP code below that.

fp_sQry="SELECT * FROM Results WHERE (Zip = '::ZIP::')
ORDER BY Company"
fp_sDefault="Zip="

Whatever is in s-sql and s-DefaultFields is copied into
corresponding ASP variables when you save the page. Try
setting it up exactly as above.

Or, try this:

s-criteria
s-order="[Zip] +"
b-procedure="FALSE" clientside SuggestedExt="asp"
s-DefaultFields

fp_sQry="SELECT * FROM Results WHERE (Zip = '::ZIP::')
ORDER BY Company"
fp_sDefault=""

On one page, I ended up leaving all of the above blank and
writing a custom ASP script to build the SQL statement and
put it into the fp_sQry variable. The trick with that,
though, is that FP gives you an error message and inserts
fp_sQry="" when you save it. You have to open it in
Notepad and delete the fp_sQry="" before publishing.

Another approach is don't use the DRW at all. Use
ASP/VBscript to query and write the results.
-----Original Message-----
I am attempting to query a SQL table using the DBW. I am
using FP2002

If I just list the entire database with no search
criteria, everything works fine.

The minute I add a search criteria (and a search form),
such as on zip, I get 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 read the article although it apples to FP2003 and it
makes no sense in my case. The only thing I can figure is
the s-attributes are incorrect but I have no idea how to
change them.

All of the fields in the SQL table are set up as varchar.

Let me know if anyone can help with this dilemna. Thanks


Here is the relevant part (I think) if my asp page.

<!--#include file="_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-
checksum="26437" --><tr>
<td>
<!--webbot bot="DatabaseResultColumn" s-
columnnames="ID,Company,Location,Address,City,State,Zip,Te l
ephone,Facsimile" s-column="Company" b-tableformat="TRUE"
b-hashtml="FALSE" b-makelink="FALSE" clientside b-
MenuFormat preview="&lt;font size=&quot;-
1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Company&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"

<td>
<!--webbot bot="DatabaseResultColumn" s-
columnnames="ID,Company,Location,Address,City,State,Zip,Te l
ephone,Facsimile" s-column="Address" b-tableformat="TRUE"
b-hashtml="FALSE" b-makelink="FALSE" clientside b-
MenuFormat preview="&lt;font size=&quot;-
1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Address&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"

<td>
<!--webbot bot="DatabaseResultColumn" s-
columnnames="ID,Company,Location,Address,City,State,Zip,Te l
ephone,Facsimile" s-column="City" b-tableformat="TRUE" b-
hashtml="FALSE" b-makelink="FALSE" clientside b- MenuFormat
preview="&lt;font size=&quot;-
1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;City&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"

<td>
<!--webbot bot="DatabaseResultColumn" s-
columnnames="ID,Company,Location,Address,City,State,Zip,Te l
ephone,Facsimile" s-column="State" b-tableformat="TRUE" b-
hashtml="FALSE" b-makelink="FALSE" clientside b- MenuFormat
preview="&lt;font size=&quot;-
1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;State&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"

<td>
<!--webbot bot="DatabaseResultColumn" s-
columnnames="ID,Company,Location,Address,City,State,Zip,Te l
ephone,Facsimile" s-column="Zip" b-tableformat="TRUE" b-
hashtml="FALSE" b-makelink="FALSE" clientside b- MenuFormat
preview="&lt;font size=&quot;-
1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Zip&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"

<td>
<!--webbot bot="DatabaseResultColumn" s-
columnnames="ID,Company,Location,Address,City,State,Zip,Te l
ephone,Facsimile" s-column="Telephone" b-
tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
clientside b-MenuFormat preview="&lt;font size=&quot;-
1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Telephone&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"
startspan --><%=FP_FieldVal(fp_rs,"Telephone")%><!-- webbot
bot="DatabaseResultColumn" endspan i-checksum="19510" --
<td>
<!--webbot bot="DatabaseResultColumn" s-
columnnames="ID,Company,Location,Address,City,State,Zip,Te l
ephone,Facsimile" s-column="Facsimile" b-
tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
clientside b-MenuFormat preview="&lt;font size=&quot;-
1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Facsimile&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"
startspan --><%=FP_FieldVal(fp_rs,"Facsimile")%><!-- webbot
bot="DatabaseResultColumn" endspan i-checksum="17973" --
</tr>
<!--webbot bot="DatabaseRegionEnd" b-
tableformat="TRUE" b-menuformat="FALSE" u-
dbrgn2="_fpclass/fpdbrgn2.inc" i-groupsize="0" clientside
tag="TBODY" preview="&lt;tr&gt;&lt;td colspan=64
bgcolor=&quot;#FFFF00&quot; align=&quot;left&quot;
width=&quot;100%&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;"
startspan --><!--#include file="_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan i-
checksum="62730" -->

.
..
 
J

Jim Buyens

I'm not entirely sure what's gone on with this so far; it
would've helped if you'd posted to the original thread.

However, the database field names are the only names the
database results wizard knows, and so those are the names
it uses for column headings.

You can overtype the headings after the DRW finishes, but
if you rerun the wizard, your hand-typed heading names
will be lost.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------



-----Original Message-----
What I dont understand is that my query and output uses
the exact field names that exist in the SQL table.

So my query still looks like this and I dont see any
differences. I have never had this problem before with
other ASP pages using DRW, even using more complex queries
and filed names not the same


<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>Company</title>
</head>

<body>

<form BOTID="0" METHOD="POST" ACTION="fax-test.asp">
<table BORDER="0">
<tr>
<td><b>Zip</b></td>
<td><input TYPE="TEXT" NAME="Zip" VALUE="<%=Request
("Zip")%>" size="20"></td>
</tr>
</table>
<p><br>
<input TYPE="Submit"><input TYPE="Reset"><!--webbot
bot="SaveAsASP" clientside suggestedext="asp" preview=" " -
-></p>
<p>&nbsp;</p>
</form>
<table width="100%" border="1">
<thead>
<tr>
<td><b>ID</b></td>
<td><b>Company</b></td>
<td><b>Location</b></td>
<td><b>Address</b></td>
<td><b>City</b></td>
<td><b>State</b></td>
<td><b>Zip</b></td>
<td><b>Telephone</b></td>
<td><b>Facsimile</b></td>
</tr>
</thead>
<tbody>
<!--webbot bot="DatabaseRegionStart" s-
columnnames="ID,Company,Location,Address,City,State,Zip,Te l
ephone,Facsimile" s-
columntypes="3,200,200,200,200,200,200,200,200" s-
dataconnection="faxfinder" 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="tblFaxList" s-
displaycolumns="ID,Company,Location,Address,City,State,Zip ,
Telephone,Facsimile" s-criteria="[Zip] EQ {Zip} +" s- order
s-sql="SELECT * FROM tblFaxList WHERE (Zip = '::Zip::')"
b-procedure="FALSE" clientside suggestedext="asp" s-
defaultfields="Zip=00000" 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="TBODY"
preview="&lt;tr&gt;&lt;td colspan=64
bgcolor=&quot;#FFFF00&quot; align=&quot;left&quot;
width=&quot;100%&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;" 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 tblFaxList WHERE (Zip = '::Zip::')"
fp_sDefault="Zip=00000"
fp_sNoRecords="<tr><td colspan=9 align=left
width=""100%"">No records returned.</td></tr>"
fp_sDataConn="faxfinder"
fp_iMaxRecords=0
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_iDisplayCols=9
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-
checksum="22618" --><tr>
<td>
<!--webbot bot="DatabaseResultColumn" s-
columnnames="ID,Company,Location,Address,City,State,Zip,Te l
ephone,Facsimile" s-column="ID" b-tableformat="TRUE" b-
hashtml="FALSE" b-makelink="FALSE" clientside b- MenuFormat
preview="&lt;font size=&quot;-
1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;ID&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"
startspan --> said:
<td>
<!--webbot bot="DatabaseResultColumn" s-
columnnames="ID,Company,Location,Address,City,State,Zip,Te l
ephone,Facsimile" s-column="Company" b-tableformat="TRUE"
b-hashtml="FALSE" b-makelink="FALSE" clientside b-
MenuFormat preview="&lt;font size=&quot;-
1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Company&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"
startspan --> said:
<td>
<!--webbot bot="DatabaseResultColumn" s-
columnnames="ID,Company,Location,Address,City,State,Zip,Te l
ephone,Facsimile" s-column="Location" b- tableformat="TRUE"
b-hashtml="FALSE" b-makelink="FALSE" clientside b-
MenuFormat preview="&lt;font size=&quot;-
1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Location&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"
startspan --> said:
<td>
<!--webbot bot="DatabaseResultColumn" s-
columnnames="ID,Company,Location,Address,City,State,Zip,Te l
ephone,Facsimile" s-column="Address" b-tableformat="TRUE"
b-hashtml="FALSE" b-makelink="FALSE" clientside b-
MenuFormat preview="&lt;font size=&quot;-
1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Address&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"
startspan --> said:
<td>
<!--webbot bot="DatabaseResultColumn" s-
columnnames="ID,Company,Location,Address,City,State,Zip,Te l
ephone,Facsimile" s-column="City" b-tableformat="TRUE" b-
hashtml="FALSE" b-makelink="FALSE" clientside b- MenuFormat
preview="&lt;font size=&quot;-
1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;City&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"
startspan --> said:
<td>
<!--webbot bot="DatabaseResultColumn" s-
columnnames="ID,Company,Location,Address,City,State,Zip,Te l
ephone,Facsimile" s-column="State" b-tableformat="TRUE" b-
hashtml="FALSE" b-makelink="FALSE" clientside b- MenuFormat
preview="&lt;font size=&quot;-
1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;State&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"
startspan --> said:
<td>
<!--webbot bot="DatabaseResultColumn" s-
columnnames="ID,Company,Location,Address,City,State,Zip,Te l
ephone,Facsimile" s-column="Zip" b-tableformat="TRUE" b-
hashtml="FALSE" b-makelink="FALSE" clientside b- MenuFormat
preview="&lt;font size=&quot;-
1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Zip&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"
startspan --> said:
<td>
<!--webbot bot="DatabaseResultColumn" s-
columnnames="ID,Company,Location,Address,City,State,Zip,Te l
ephone,Facsimile" s-column="Telephone" b-
tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
clientside b-MenuFormat preview="&lt;font size=&quot;-
1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Telephone&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"
startspan --><%=FP_FieldVal(fp_rs,"Telephone")%><!-- webbot
bot="DatabaseResultColumn" endspan i-checksum="19510" --
<td>
<!--webbot bot="DatabaseResultColumn" s-
columnnames="ID,Company,Location,Address,City,State,Zip,Te l
ephone,Facsimile" s-column="Facsimile" b-
tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
clientside b-MenuFormat preview="&lt;font size=&quot;-
1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Facsimile&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"
startspan --><%=FP_FieldVal(fp_rs,"Facsimile")%><!-- webbot
bot="DatabaseResultColumn" endspan i-checksum="17973" --
</tr>
<!--webbot bot="DatabaseRegionEnd" b-
tableformat="TRUE" b-menuformat="FALSE" u-
dbrgn2="_fpclass/fpdbrgn2.inc" i-groupsize="0" clientside
tag="TBODY" preview="&lt;tr&gt;&lt;td colspan=64
bgcolor=&quot;#FFFF00&quot; align=&quot;left&quot;
width=&quot;100%&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;"
startspan --><!--#include file="_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan i-
checksum="62730" --></tbody>
</table>

</body>

</html>





Subject: Database Results Error
From: "Nicholas" <[email protected]>
Sent: 9/9/2004 9:51:32 AM




What it boils down to is that FP uses only one SQL
statement to put results into the table created by DRW.
If you try to use different columns, it tries to write an
overcomplicated SQL statement that doesn't work.

The stuff that displays in the FP DRW and in the Normal
view are contained in the grayed out "DatabaseRegionStart"
area in the HTML view.

s-criteria="[Zip] EQ {Zip} +" s-order
s-sql="SELECT * FROM Results WHERE (Zip = '::Zip::')
ORDER BY Company"
b-procedure="FALSE" clientside SuggestedExt="asp"
s-DefaultFields="Zip="

The actual query that runs is in the ASP code below that.

fp_sQry="SELECT * FROM Results WHERE (Zip = '::ZIP::')
ORDER BY Company"
fp_sDefault="Zip="

Whatever is in s-sql and s-DefaultFields is copied into
corresponding ASP variables when you save the page. Try
setting it up exactly as above.

Or, try this:

s-criteria
s-order="[Zip] +"
b-procedure="FALSE" clientside SuggestedExt="asp"
s-DefaultFields

fp_sQry="SELECT * FROM Results WHERE (Zip = '::ZIP::')
ORDER BY Company"
fp_sDefault=""

On one page, I ended up leaving all of the above blank and
writing a custom ASP script to build the SQL statement and
put it into the fp_sQry variable. The trick with that,
though, is that FP gives you an error message and inserts
fp_sQry="" when you save it. You have to open it in
Notepad and delete the fp_sQry="" before publishing.

Another approach is don't use the DRW at all. Use
ASP/VBscript to query and write the results.
-----Original Message-----
I am attempting to query a SQL table using the DBW. I am
using FP2002

If I just list the entire database with no search
criteria, everything works fine.

The minute I add a search criteria (and a search form),
such as on zip, I get 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 read the article although it apples to FP2003 and it
makes no sense in my case. The only thing I can figure is
the s-attributes are incorrect but I have no idea how to
change them.

All of the fields in the SQL table are set up as varchar.

Let me know if anyone can help with this dilemna. Thanks


Here is the relevant part (I think) if my asp page.

<!--#include file="_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-
checksum="26437" --><tr>
<td>
<!--webbot bot="DatabaseResultColumn" s-
columnnames="ID,Company,Location,Address,City,State,Zip,T
e
l
ephone,Facsimile" s-column="Company" b- tableformat="TRUE"
b-hashtml="FALSE" b-makelink="FALSE" clientside b-
MenuFormat preview="&lt;font size=&quot;-
1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Company&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"

<td>
<!--webbot bot="DatabaseResultColumn" s-
columnnames="ID,Company,Location,Address,City,State,Zip,T
e
l
ephone,Facsimile" s-column="Address" b- tableformat="TRUE"
b-hashtml="FALSE" b-makelink="FALSE" clientside b-
MenuFormat preview="&lt;font size=&quot;-
1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Address&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"

<td>
<!--webbot bot="DatabaseResultColumn" s-
columnnames="ID,Company,Location,Address,City,State,Zip,T
e
l
ephone,Facsimile" s-column="City" b-tableformat="TRUE" b-
hashtml="FALSE" b-makelink="FALSE" clientside b- MenuFormat
preview="&lt;font size=&quot;-
1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;City&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"

<td>
<!--webbot bot="DatabaseResultColumn" s-
columnnames="ID,Company,Location,Address,City,State,Zip,T
e
l
ephone,Facsimile" s-column="State" b-tableformat="TRUE" b-
hashtml="FALSE" b-makelink="FALSE" clientside b- MenuFormat
preview="&lt;font size=&quot;-
1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;State&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"

<td>
<!--webbot bot="DatabaseResultColumn" s-
columnnames="ID,Company,Location,Address,City,State,Zip,T
e
l
ephone,Facsimile" s-column="Zip" b-tableformat="TRUE" b-
hashtml="FALSE" b-makelink="FALSE" clientside b- MenuFormat
preview="&lt;font size=&quot;-
1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Zip&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"

<td>
<!--webbot bot="DatabaseResultColumn" s-
columnnames="ID,Company,Location,Address,City,State,Zip,T
e
l
ephone,Facsimile" s-column="Telephone" b-
tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
clientside b-MenuFormat preview="&lt;font size=&quot;-
1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Telephone&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"
startspan --><%=FP_FieldVal(fp_rs,"Telephone")%><!-- webbot
bot="DatabaseResultColumn" endspan i-checksum="19510" --
<td>
<!--webbot bot="DatabaseResultColumn" s-
columnnames="ID,Company,Location,Address,City,State,Zip,T
e
l
ephone,Facsimile" s-column="Facsimile" b-
tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
clientside b-MenuFormat preview="&lt;font size=&quot;-
1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Facsimile&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"
startspan --><%=FP_FieldVal(fp_rs,"Facsimile")%><!-- webbot
bot="DatabaseResultColumn" endspan i-checksum="17973" --
</tr>
<!--webbot bot="DatabaseRegionEnd" b-
tableformat="TRUE" b-menuformat="FALSE" u-
dbrgn2="_fpclass/fpdbrgn2.inc" i-groupsize="0" clientside
tag="TBODY" preview="&lt;tr&gt;&lt;td colspan=64
bgcolor=&quot;#FFFF00&quot; align=&quot;left&quot;
width=&quot;100%&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;"
startspan --><!--#include file="_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan i-
checksum="62730" -->

.
..


.
 

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