excel database format currency

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a column in an excel data base I'd like to present as currency,
$xxx,xxx. I've read the posts about formating currency especially that from
spiderwebwoman but they seem to pertain to access. The error message I'm
getting suggest "format" is not a recognized commmand. FP2002.
 
Yes it is a asp page. The page is

http://www.bdmcdaytona.com/testcbas/listings.asp

and I think the code you're looking for is:

<html>

<head>
<% ' FP_ASP -- ASP Automatically generated by a Frontpage Component. Do not
Edit.
FP_LCID = 1033 %>
<meta http-equiv="Content-Language" content="en-us">
<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>Coldwell Banker All Stars Listings</title>
</head>

<body bgcolor="#C0C0C0" background="images/bgrndblack.jpg" link="#0B2476"
vlink="#0000FF" topmargin="0" leftmargin="0">

<div align="center">
<center>
<table border="4" cellpadding="0" cellspacing="0" style="border-collapse:
collapse" bordercolor="#CC8637" id="AutoNumber8" width="21">
<tr>
<td width="13">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse:
collapse" id="AutoNumber1" width="867" height="359" bgcolor="#000000">
<tr>
<td colspan="2" width="867" height="1" align="center" valign="top">
<img border="0" src="images/goldandblack3.jpg"></td>
</tr>
<tr>
<td colspan="2" width="867" height="1" align="center"
valign="top"> </td>
</tr>
<tr>
<td align="left" valign="top" rowspan="2" width="140" height="286">
<table border="2" cellspacing="4" style="border-collapse:
collapse" bordercolor="#CC8637" cellpadding="4" id="AutoNumber7"
background="images/bgrndblackncbas.jpg">
<tr>
<td>
<!--webbot bot="Navigation" S-Type="sequence"
S-Orientation="vertical" S-Rendering="graphics" S-Theme="zero 110"
B-Include-Home="FALSE" B-Include-Up="FALSE" U-Page="sid:1001" --></td>
</tr>
</table>
</td>
<td align="center" height="10" valign="top">
<table border="4" cellspacing="0" id="AutoNumber2"
bordercolor="#0B2476" bgcolor="#E0E0E0" width="700" style="border-collapse:
collapse" cellpadding="0">
<tr>
<td>
<p align="center"><b><font color="#0B2476">Coldwell Banker All
Stars
Listings</font></b></td>
</tr>
<tr>
<td>
<table width="700" cellspacing="3" bgcolor="#FFFFFF"
cellpadding="3" bordercolor="#FF0000">
<thead>
<tr>
<td bgcolor="#C0C0C0" width="152"><u><i><font color="#0B2476">
<b>Description</b></font></i></u></td>
<td bgcolor="#C0C0C0" width="100"><u><i><font color="#0B2476">
<b>Office</b></font></i></u></td>
<td bgcolor="#C0C0C0" width="96" align="center"><u><i>
<font color="#0B2476"><b>Bedrooms</b></font></i></u></td>
<td bgcolor="#C0C0C0" width="96" align="center"><u><i>
<font color="#0B2476"><b>Bathrooms</b></font></i></u></td>
<td bgcolor="#C0C0C0" width="125"><u><i><font color="#0B2476">
<b>Agent</b></font></i></u></td>
<td bgcolor="#C0C0C0" width="129" align="center"><u><i>
<font color="#0B2476"><b>Price</b></font></i></u></td>
</tr>
</thead>
<tbody>
<!--webbot bot="DatabaseRegionStart"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-columntypes="200,200,5,5,200,6" s-dataconnection="Database2"
b-tableformat="TRUE" b-menuformat="FALSE" s-menuchoice="Description"
s-menuvalue="Description" b-tableborder="FALSE" b-tableexpand="FALSE"
b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE"
i-listformat="0" b-makeform="TRUE" s-recordsource="agent3"
s-displaycolumns="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-criteria s-order="[Price] -" s-sql="SELECT * FROM &quot;agent3&quot; ORDER
BY Price DESC" b-procedure="FALSE" clientside suggestedext="asp"
s-defaultfields s-norecordsfound="No records returned." i-maxrecords="256"
i-groupsize="0" botid="1" 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. 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>"
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="SELECT * FROM ""agent3"" ORDER BY Price DESC"
fp_sDefault=""
fp_sNoRecords="<tr><td colspan=6 align=left width=""100%"">No records
returned.</td></tr>"
fp_sDataConn="Database2"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice="Description"
fp_sMenuValue="Description"
fp_sColTypes="&Description=200&Office=200&Bedrooms=5&Bathrooms=5&Agent=200&Price=6&"
fp_iDisplayCols=6
fp_fCustomQuery=False
BOTID=1
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="35829" --><tr>
<td bgcolor="#FFFFFF" width="152" height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Description" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE" clientside b-MenuFormat preview="<font
size="-1">&lt;&lt;</font>Description<font size="-1">&gt;&gt;</font>"
startspan --><%=FP_FieldVal(fp_rs,"Description")%><!--webbot
bot="DatabaseResultColumn" endspan i-checksum="30092" --></font></td>
<td bgcolor="#FFFFFF" width="100" height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Office" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>Office<font
size="-1">&gt;&gt;</font>" startspan
--><%=FP_FieldVal(fp_rs,"Office")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="14929" --></font></td>
<td bgcolor="#FFFFFF" width="96" align="center" height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Bedrooms" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>Bedrooms<font
size="-1">&gt;&gt;</font>" startspan
--><%=FP_FieldVal(fp_rs,"Bedrooms")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="14962" --></font></td>
<td bgcolor="#FFFFFF" width="96" align="center" height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Bathrooms" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE" clientside b-MenuFormat preview="<font
size="-1">&lt;&lt;</font>Bathrooms<font size="-1">&gt;&gt;</font>" startspan
--><%=FP_FieldVal(fp_rs,"Bathrooms")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="18788" --></font></td>
<td bgcolor="#FFFFFF" width="125" height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Agent" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>Agent<font
size="-1">&gt;&gt;</font>" startspan
--><%=FP_FieldVal(fp_rs,"Agent")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="7350" --></font></td>
<td bgcolor="#FFFFFF" width="129" align="center" height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Price" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>Price<font
size="-1">&gt;&gt;</font>" startspan
--><%=FP_FieldVal(fp_rs,"Price")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="9640" --></font></td>
</tr>
<!--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="62730" --></tbody>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center" height="133" valign="top">
</td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</div>

</body>

</html>
 
In your SELECT statement, instead of SELECT * put all the fields you need
and put the format statement there, ex:

SELECT Description, Office, Bedroom, Bathrooms, Agent,
Format(Price,'$#,##0.00') as PriceField FROM .........

Then where it says:

<%=FP_FieldVal(fp_rs,"Price")%>

You'd make that"

<%=FP_FieldVal(fp_rs,"PriceField")%>

If that doesn't what is the exact error message you're getting?

--
David Berry
FrontPage Support: http://www.frontpagemvps.com/



Daytona Steve said:
Yes it is a asp page. The page is

http://www.bdmcdaytona.com/testcbas/listings.asp

and I think the code you're looking for is:

<html>

<head>
<% ' FP_ASP -- ASP Automatically generated by a Frontpage Component. Do
not
Edit.
FP_LCID = 1033 %>
<meta http-equiv="Content-Language" content="en-us">
<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>Coldwell Banker All Stars Listings</title>
</head>

<body bgcolor="#C0C0C0" background="images/bgrndblack.jpg" link="#0B2476"
vlink="#0000FF" topmargin="0" leftmargin="0">

<div align="center">
<center>
<table border="4" cellpadding="0" cellspacing="0" style="border-collapse:
collapse" bordercolor="#CC8637" id="AutoNumber8" width="21">
<tr>
<td width="13">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse:
collapse" id="AutoNumber1" width="867" height="359" bgcolor="#000000">
<tr>
<td colspan="2" width="867" height="1" align="center" valign="top">
<img border="0" src="images/goldandblack3.jpg"></td>
</tr>
<tr>
<td colspan="2" width="867" height="1" align="center"
valign="top"> </td>
</tr>
<tr>
<td align="left" valign="top" rowspan="2" width="140" height="286">
<table border="2" cellspacing="4" style="border-collapse:
collapse" bordercolor="#CC8637" cellpadding="4" id="AutoNumber7"
background="images/bgrndblackncbas.jpg">
<tr>
<td>
<!--webbot bot="Navigation" S-Type="sequence"
S-Orientation="vertical" S-Rendering="graphics" S-Theme="zero 110"
B-Include-Home="FALSE" B-Include-Up="FALSE" U-Page="sid:1001" --></td>
</tr>
</table>
</td>
<td align="center" height="10" valign="top">
<table border="4" cellspacing="0" id="AutoNumber2"
bordercolor="#0B2476" bgcolor="#E0E0E0" width="700"
style="border-collapse:
collapse" cellpadding="0">
<tr>
<td>
<p align="center"><b><font color="#0B2476">Coldwell Banker All
Stars
Listings</font></b></td>
</tr>
<tr>
<td>
<table width="700" cellspacing="3" bgcolor="#FFFFFF"
cellpadding="3" bordercolor="#FF0000">
<thead>
<tr>
<td bgcolor="#C0C0C0" width="152"><u><i><font
color="#0B2476">
<b>Description</b></font></i></u></td>
<td bgcolor="#C0C0C0" width="100"><u><i><font
color="#0B2476">
<b>Office</b></font></i></u></td>
<td bgcolor="#C0C0C0" width="96" align="center"><u><i>
<font color="#0B2476"><b>Bedrooms</b></font></i></u></td>
<td bgcolor="#C0C0C0" width="96" align="center"><u><i>
<font color="#0B2476"><b>Bathrooms</b></font></i></u></td>
<td bgcolor="#C0C0C0" width="125"><u><i><font
color="#0B2476">
<b>Agent</b></font></i></u></td>
<td bgcolor="#C0C0C0" width="129" align="center"><u><i>
<font color="#0B2476"><b>Price</b></font></i></u></td>
</tr>
</thead>
<tbody>
<!--webbot bot="DatabaseRegionStart"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-columntypes="200,200,5,5,200,6" s-dataconnection="Database2"
b-tableformat="TRUE" b-menuformat="FALSE" s-menuchoice="Description"
s-menuvalue="Description" b-tableborder="FALSE" b-tableexpand="FALSE"
b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE"
i-listformat="0" b-makeform="TRUE" s-recordsource="agent3"
s-displaycolumns="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-criteria s-order="[Price] -" s-sql="SELECT * FROM &quot;agent3&quot;
ORDER
BY Price DESC" b-procedure="FALSE" clientside suggestedext="asp"
s-defaultfields s-norecordsfound="No records returned." i-maxrecords="256"
i-groupsize="0" botid="1" 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. 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>"
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="SELECT * FROM ""agent3"" ORDER BY Price DESC"
fp_sDefault=""
fp_sNoRecords="<tr><td colspan=6 align=left width=""100%"">No records
returned.</td></tr>"
fp_sDataConn="Database2"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice="Description"
fp_sMenuValue="Description"
fp_sColTypes="&Description=200&Office=200&Bedrooms=5&Bathrooms=5&Agent=200&Price=6&"
fp_iDisplayCols=6
fp_fCustomQuery=False
BOTID=1
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="35829" --><tr>
<td bgcolor="#FFFFFF" width="152" height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Description" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE" clientside b-MenuFormat preview="<font
size="-1">&lt;&lt;</font>Description<font size="-1">&gt;&gt;</font>"
startspan --><%=FP_FieldVal(fp_rs,"Description")%><!--webbot
bot="DatabaseResultColumn" endspan i-checksum="30092" --></font></td>
<td bgcolor="#FFFFFF" width="100" height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Office" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE"
clientside b-MenuFormat preview="<font
size="-1">&lt;&lt;</font>Office<font
size="-1">&gt;&gt;</font>" startspan
--><%=FP_FieldVal(fp_rs,"Office")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="14929" --></font></td>
<td bgcolor="#FFFFFF" width="96" align="center"
height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Bedrooms" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE"
clientside b-MenuFormat preview="<font
size="-1">&lt;&lt;</font>Bedrooms<font
size="-1">&gt;&gt;</font>" startspan
--><%=FP_FieldVal(fp_rs,"Bedrooms")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="14962" --></font></td>
<td bgcolor="#FFFFFF" width="96" align="center"
height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Bathrooms" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE" clientside b-MenuFormat preview="<font
size="-1">&lt;&lt;</font>Bathrooms<font size="-1">&gt;&gt;</font>"
startspan
--><%=FP_FieldVal(fp_rs,"Bathrooms")%><!--webbot
bot="DatabaseResultColumn"
endspan i-checksum="18788" --></font></td>
<td bgcolor="#FFFFFF" width="125" height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Agent" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>Agent<font
size="-1">&gt;&gt;</font>" startspan
--><%=FP_FieldVal(fp_rs,"Agent")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="7350" --></font></td>
<td bgcolor="#FFFFFF" width="129" align="center"
height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Price" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>Price<font
size="-1">&gt;&gt;</font>" startspan
--><%=FP_FieldVal(fp_rs,"Price")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="9640" --></font></td>
</tr>
<!--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="62730" --></tbody>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center" height="133" valign="top">
</td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</div>

</body>

</html>



David Berry said:
What is the code you're using? Is your page an ASP page?
 
Thanks for the effort on this but no joy so far......

this is the modified code: ( removed the gray code so it would stick)

<% 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 Description, Office, Bedroom, Bathrooms, Agent,
Format(Price,'$#,##0.00') as PriceField FROM ""agent3"" ORDER BY Price DESC"
fp_sDefault=""
fp_sNoRecords="<tr><td colspan=6 align=left width=""100%"">No records
returned.</td></tr>"
fp_sDataConn="Database2"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice="Description"
fp_sMenuValue="Description
fp_sColTypes="&Description=200&Office=200&Bedrooms=5&Bathrooms=5&Agent=200&Price=6&"
fp_iDisplayCols=6
fp_fCustomQuery=False
BOTID=1
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="35829" --><tr>
<td bgcolor="#FFFFFF" width="152" height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Description" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE" clientside b-MenuFormat preview="<font
size="-1">&lt;&lt;</font>Description<font size="-1">&gt;&gt;</font>"
startspan --><%=FP_FieldVal(fp_rs,"Description")%><!--webbot
bot="DatabaseResultColumn" endspan i-checksum="30092" --></font></td>
<td bgcolor="#FFFFFF" width="100" height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Office" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>Office<font
size="-1">&gt;&gt;</font>" startspan
--><%=FP_FieldVal(fp_rs,"Office")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="14929" --></font></td>
<td bgcolor="#FFFFFF" width="96" align="center" height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Bedrooms" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>Bedrooms<font
size="-1">&gt;&gt;</font>" startspan
--><%=FP_FieldVal(fp_rs,"Bedrooms")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="14962" --></font></td>
<td bgcolor="#FFFFFF" width="96" align="center" height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Bathrooms" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE" clientside b-MenuFormat preview="<font
size="-1">&lt;&lt;</font>Bathrooms<font size="-1">&gt;&gt;</font>" startspan
--><%=FP_FieldVal(fp_rs,"Bathrooms")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="18788" --></font></td>
<td bgcolor="#FFFFFF" width="125" height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Agent" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>Agent<font
size="-1">&gt;&gt;</font>" startspan
--><%=FP_FieldVal(fp_rs,"Agent")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="7350" --></font></td>
<td bgcolor="#FFFFFF" width="129" align="center" height="40">
<font color="#0B2476">
<%=FP_FieldVal(fp_rs,"PriceField")%></font></td>
</tr>
<!--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="62730" --></tbody>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center" height="133" valign="top">
</td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</div>

</body>

</html>

And this is the error I got..

http://www.bdmcdaytona.com/testcbas/listingsv2.asp

In the Page View of FP <<Price>> is missing from the Price column

David Berry said:
In your SELECT statement, instead of SELECT * put all the fields you need
and put the format statement there, ex:

SELECT Description, Office, Bedroom, Bathrooms, Agent,
Format(Price,'$#,##0.00') as PriceField FROM .........

Then where it says:

<%=FP_FieldVal(fp_rs,"Price")%>

You'd make that"

<%=FP_FieldVal(fp_rs,"PriceField")%>

If that doesn't what is the exact error message you're getting?

--
David Berry
FrontPage Support: http://www.frontpagemvps.com/



Daytona Steve said:
Yes it is a asp page. The page is

http://www.bdmcdaytona.com/testcbas/listings.asp

and I think the code you're looking for is:

<html>

<head>
<% ' FP_ASP -- ASP Automatically generated by a Frontpage Component. Do
not
Edit.
FP_LCID = 1033 %>
<meta http-equiv="Content-Language" content="en-us">
<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>Coldwell Banker All Stars Listings</title>
</head>

<body bgcolor="#C0C0C0" background="images/bgrndblack.jpg" link="#0B2476"
vlink="#0000FF" topmargin="0" leftmargin="0">

<div align="center">
<center>
<table border="4" cellpadding="0" cellspacing="0" style="border-collapse:
collapse" bordercolor="#CC8637" id="AutoNumber8" width="21">
<tr>
<td width="13">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse:
collapse" id="AutoNumber1" width="867" height="359" bgcolor="#000000">
<tr>
<td colspan="2" width="867" height="1" align="center" valign="top">
<img border="0" src="images/goldandblack3.jpg"></td>
</tr>
<tr>
<td colspan="2" width="867" height="1" align="center"
valign="top"> </td>
</tr>
<tr>
<td align="left" valign="top" rowspan="2" width="140" height="286">
<table border="2" cellspacing="4" style="border-collapse:
collapse" bordercolor="#CC8637" cellpadding="4" id="AutoNumber7"
background="images/bgrndblackncbas.jpg">
<tr>
<td>
<!--webbot bot="Navigation" S-Type="sequence"
S-Orientation="vertical" S-Rendering="graphics" S-Theme="zero 110"
B-Include-Home="FALSE" B-Include-Up="FALSE" U-Page="sid:1001" --></td>
</tr>
</table>
</td>
<td align="center" height="10" valign="top">
<table border="4" cellspacing="0" id="AutoNumber2"
bordercolor="#0B2476" bgcolor="#E0E0E0" width="700"
style="border-collapse:
collapse" cellpadding="0">
<tr>
<td>
<p align="center"><b><font color="#0B2476">Coldwell Banker All
Stars
Listings</font></b></td>
</tr>
<tr>
<td>
<table width="700" cellspacing="3" bgcolor="#FFFFFF"
cellpadding="3" bordercolor="#FF0000">
<thead>
<tr>
<td bgcolor="#C0C0C0" width="152"><u><i><font
color="#0B2476">
<b>Description</b></font></i></u></td>
<td bgcolor="#C0C0C0" width="100"><u><i><font
color="#0B2476">
<b>Office</b></font></i></u></td>
<td bgcolor="#C0C0C0" width="96" align="center"><u><i>
<font color="#0B2476"><b>Bedrooms</b></font></i></u></td>
<td bgcolor="#C0C0C0" width="96" align="center"><u><i>
<font color="#0B2476"><b>Bathrooms</b></font></i></u></td>
<td bgcolor="#C0C0C0" width="125"><u><i><font
color="#0B2476">
<b>Agent</b></font></i></u></td>
<td bgcolor="#C0C0C0" width="129" align="center"><u><i>
<font color="#0B2476"><b>Price</b></font></i></u></td>
</tr>
</thead>
<tbody>
<!--webbot bot="DatabaseRegionStart"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-columntypes="200,200,5,5,200,6" s-dataconnection="Database2"
b-tableformat="TRUE" b-menuformat="FALSE" s-menuchoice="Description"
s-menuvalue="Description" b-tableborder="FALSE" b-tableexpand="FALSE"
b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE"
i-listformat="0" b-makeform="TRUE" s-recordsource="agent3"
s-displaycolumns="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-criteria s-order="[Price] -" s-sql="SELECT * FROM "agent3"
ORDER
BY Price DESC" b-procedure="FALSE" clientside suggestedext="asp"
s-defaultfields s-norecordsfound="No records returned." i-maxrecords="256"
i-groupsize="0" botid="1" 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. 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>"
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="SELECT * FROM ""agent3"" ORDER BY Price DESC"
fp_sDefault=""
fp_sNoRecords="<tr><td colspan=6 align=left width=""100%"">No records
returned.</td></tr>"
fp_sDataConn="Database2"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice="Description"
fp_sMenuValue="Description"
fp_sColTypes="&Description=200&Office=200&Bedrooms=5&Bathrooms=5&Agent=200&Price=6&"
fp_iDisplayCols=6
fp_fCustomQuery=False
BOTID=1
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="35829" --><tr>
<td bgcolor="#FFFFFF" width="152" height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Description" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE" clientside b-MenuFormat preview="<font
size="-1"><<</font>Description<font size="-1">>></font>"
startspan --><%=FP_FieldVal(fp_rs,"Description")%><!--webbot
bot="DatabaseResultColumn" endspan i-checksum="30092" --></font></td>
<td bgcolor="#FFFFFF" width="100" height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Office" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE"
clientside b-MenuFormat preview="<font
size="-1"><<</font>Office<font
size="-1">>></font>" startspan
--><%=FP_FieldVal(fp_rs,"Office")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="14929" --></font></td>
<td bgcolor="#FFFFFF" width="96" align="center"
height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Bedrooms" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE"
clientside b-MenuFormat preview="<font
size="-1"><<</font>Bedrooms<font
size="-1">>></font>" startspan
--><%=FP_FieldVal(fp_rs,"Bedrooms")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="14962" --></font></td>
<td bgcolor="#FFFFFF" width="96" align="center"
height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Bathrooms" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE" clientside b-MenuFormat preview="<font
size="-1"><<</font>Bathrooms<font size="-1">>></font>"
startspan
--><%=FP_FieldVal(fp_rs,"Bathrooms")%><!--webbot
bot="DatabaseResultColumn"
endspan i-checksum="18788" --></font></td>
<td bgcolor="#FFFFFF" width="125" height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Agent" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
clientside b-MenuFormat preview="<font size="-1"><<</font>Agent<font
size="-1">>></font>" startspan
--><%=FP_FieldVal(fp_rs,"Agent")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="7350" --></font></td>
<td bgcolor="#FFFFFF" width="129" align="center"
height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Price" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
clientside b-MenuFormat preview="<font size="-1"><<</font>Price<font
size="-1">>></font>" startspan
--><%=FP_FieldVal(fp_rs,"Price")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="9640" --></font></td>
</tr>
<!--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="62730" --></tbody>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center" height="133" valign="top">
</td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</div>

</body>

</html>



David Berry said:
What is the code you're using? Is your page an ASP page?

--
David Berry
FrontPage Support: http://www.frontpagemvps.com/



I have a column in an excel data base I'd like to present as currency,
$xxx,xxx. I've read the posts about formating currency especially that
from
spiderwebwoman but they seem to pertain to access. The error message
I'm
getting suggest "format" is not a recognized commmand. FP2002.
 
The error message ("Unterminated string constant ") means there's a problem
with the line, a missing quote, an extra quote or something else that is
terminating the string too soon. From the error page it looks like your SQL
Statement is on two lines. It should all be on one line. Ex:

"SELECT Description, Office, Bedroom, Bathrooms, Agent,
Format(Price,'$#,##0.00') as PriceField FROM agent3 ORDER BY Price DESC"

One double quote at the beginning and one at the end.


--
David Berry
FrontPage Support: http://www.frontpagemvps.com/



Daytona Steve said:
Thanks for the effort on this but no joy so far......

this is the modified code: ( removed the gray code so it would stick)

<% 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 Description, Office, Bedroom, Bathrooms, Agent,
Format(Price,'$#,##0.00') as PriceField FROM ""agent3"" ORDER BY Price
DESC"
fp_sDefault=""
fp_sNoRecords="<tr><td colspan=6 align=left width=""100%"">No records
returned.</td></tr>"
fp_sDataConn="Database2"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice="Description"
fp_sMenuValue="Description"
fp_sColTypes="&Description=200&Office=200&Bedrooms=5&Bathrooms=5&Agent=200&Price=6&"
fp_iDisplayCols=6
fp_fCustomQuery=False
BOTID=1
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="35829" --><tr>
<td bgcolor="#FFFFFF" width="152" height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Description" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE" clientside b-MenuFormat preview="<font
size="-1">&lt;&lt;</font>Description<font size="-1">&gt;&gt;</font>"
startspan --><%=FP_FieldVal(fp_rs,"Description")%><!--webbot
bot="DatabaseResultColumn" endspan i-checksum="30092" --></font></td>
<td bgcolor="#FFFFFF" width="100" height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Office" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE"
clientside b-MenuFormat preview="<font
size="-1">&lt;&lt;</font>Office<font
size="-1">&gt;&gt;</font>" startspan
--><%=FP_FieldVal(fp_rs,"Office")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="14929" --></font></td>
<td bgcolor="#FFFFFF" width="96" align="center"
height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Bedrooms" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE"
clientside b-MenuFormat preview="<font
size="-1">&lt;&lt;</font>Bedrooms<font
size="-1">&gt;&gt;</font>" startspan
--><%=FP_FieldVal(fp_rs,"Bedrooms")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="14962" --></font></td>
<td bgcolor="#FFFFFF" width="96" align="center"
height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Bathrooms" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE" clientside b-MenuFormat preview="<font
size="-1">&lt;&lt;</font>Bathrooms<font size="-1">&gt;&gt;</font>"
startspan
--><%=FP_FieldVal(fp_rs,"Bathrooms")%><!--webbot
bot="DatabaseResultColumn"
endspan i-checksum="18788" --></font></td>
<td bgcolor="#FFFFFF" width="125" height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Agent" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>Agent<font
size="-1">&gt;&gt;</font>" startspan
--><%=FP_FieldVal(fp_rs,"Agent")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="7350" --></font></td>
<td bgcolor="#FFFFFF" width="129" align="center"
height="40">
<font color="#0B2476">
<%=FP_FieldVal(fp_rs,"PriceField")%></font></td>
</tr>
<!--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="62730" --></tbody>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center" height="133" valign="top">
</td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</div>

</body>

</html>

And this is the error I got..

http://www.bdmcdaytona.com/testcbas/listingsv2.asp

In the Page View of FP <<Price>> is missing from the Price column

David Berry said:
In your SELECT statement, instead of SELECT * put all the fields you need
and put the format statement there, ex:

SELECT Description, Office, Bedroom, Bathrooms, Agent,
Format(Price,'$#,##0.00') as PriceField FROM .........

Then where it says:

<%=FP_FieldVal(fp_rs,"Price")%>

You'd make that"

<%=FP_FieldVal(fp_rs,"PriceField")%>

If that doesn't what is the exact error message you're getting?

--
David Berry
FrontPage Support: http://www.frontpagemvps.com/



Daytona Steve said:
Yes it is a asp page. The page is

http://www.bdmcdaytona.com/testcbas/listings.asp

and I think the code you're looking for is:

<html>

<head>
<% ' FP_ASP -- ASP Automatically generated by a Frontpage Component. Do
not
Edit.
FP_LCID = 1033 %>
<meta http-equiv="Content-Language" content="en-us">
<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>Coldwell Banker All Stars Listings</title>
</head>

<body bgcolor="#C0C0C0" background="images/bgrndblack.jpg"
link="#0B2476"
vlink="#0000FF" topmargin="0" leftmargin="0">

<div align="center">
<center>
<table border="4" cellpadding="0" cellspacing="0"
style="border-collapse:
collapse" bordercolor="#CC8637" id="AutoNumber8" width="21">
<tr>
<td width="13">
<table border="0" cellpadding="0" cellspacing="0"
style="border-collapse:
collapse" id="AutoNumber1" width="867" height="359" bgcolor="#000000">
<tr>
<td colspan="2" width="867" height="1" align="center"
valign="top">
<img border="0" src="images/goldandblack3.jpg"></td>
</tr>
<tr>
<td colspan="2" width="867" height="1" align="center"
valign="top"> </td>
</tr>
<tr>
<td align="left" valign="top" rowspan="2" width="140"
height="286">
<table border="2" cellspacing="4" style="border-collapse:
collapse" bordercolor="#CC8637" cellpadding="4" id="AutoNumber7"
background="images/bgrndblackncbas.jpg">
<tr>
<td>
<!--webbot bot="Navigation" S-Type="sequence"
S-Orientation="vertical" S-Rendering="graphics" S-Theme="zero 110"
B-Include-Home="FALSE" B-Include-Up="FALSE" U-Page="sid:1001" --></td>
</tr>
</table>
</td>
<td align="center" height="10" valign="top">
<table border="4" cellspacing="0" id="AutoNumber2"
bordercolor="#0B2476" bgcolor="#E0E0E0" width="700"
style="border-collapse:
collapse" cellpadding="0">
<tr>
<td>
<p align="center"><b><font color="#0B2476">Coldwell Banker All
Stars
Listings</font></b></td>
</tr>
<tr>
<td>
<table width="700" cellspacing="3" bgcolor="#FFFFFF"
cellpadding="3" bordercolor="#FF0000">
<thead>
<tr>
<td bgcolor="#C0C0C0" width="152"><u><i><font
color="#0B2476">
<b>Description</b></font></i></u></td>
<td bgcolor="#C0C0C0" width="100"><u><i><font
color="#0B2476">
<b>Office</b></font></i></u></td>
<td bgcolor="#C0C0C0" width="96" align="center"><u><i>
<font
color="#0B2476"><b>Bedrooms</b></font></i></u></td>
<td bgcolor="#C0C0C0" width="96" align="center"><u><i>
<font
color="#0B2476"><b>Bathrooms</b></font></i></u></td>
<td bgcolor="#C0C0C0" width="125"><u><i><font
color="#0B2476">
<b>Agent</b></font></i></u></td>
<td bgcolor="#C0C0C0" width="129" align="center"><u><i>
<font color="#0B2476"><b>Price</b></font></i></u></td>
</tr>
</thead>
<tbody>
<!--webbot bot="DatabaseRegionStart"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-columntypes="200,200,5,5,200,6" s-dataconnection="Database2"
b-tableformat="TRUE" b-menuformat="FALSE" s-menuchoice="Description"
s-menuvalue="Description" b-tableborder="FALSE" b-tableexpand="FALSE"
b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE"
i-listformat="0" b-makeform="TRUE" s-recordsource="agent3"
s-displaycolumns="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-criteria s-order="[Price] -" s-sql="SELECT * FROM "agent3"
ORDER
BY Price DESC" b-procedure="FALSE" clientside suggestedext="asp"
s-defaultfields s-norecordsfound="No records returned."
i-maxrecords="256"
i-groupsize="0" botid="1" 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. 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>"
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="SELECT * FROM ""agent3"" ORDER BY Price DESC"
fp_sDefault=""
fp_sNoRecords="<tr><td colspan=6 align=left width=""100%"">No records
returned.</td></tr>"
fp_sDataConn="Database2"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice="Description"
fp_sMenuValue="Description"
fp_sColTypes="&Description=200&Office=200&Bedrooms=5&Bathrooms=5&Agent=200&Price=6&"
fp_iDisplayCols=6
fp_fCustomQuery=False
BOTID=1
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="35829" --><tr>
<td bgcolor="#FFFFFF" width="152" height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Description" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE" clientside b-MenuFormat preview="<font
size="-1"><<</font>Description<font size="-1">>></font>"
startspan --><%=FP_FieldVal(fp_rs,"Description")%><!--webbot
bot="DatabaseResultColumn" endspan i-checksum="30092" --></font></td>
<td bgcolor="#FFFFFF" width="100" height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Office" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE"
clientside b-MenuFormat preview="<font
size="-1"><<</font>Office<font
size="-1">>></font>" startspan
--><%=FP_FieldVal(fp_rs,"Office")%><!--webbot
bot="DatabaseResultColumn"
endspan i-checksum="14929" --></font></td>
<td bgcolor="#FFFFFF" width="96" align="center"
height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Bedrooms" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE"
clientside b-MenuFormat preview="<font
size="-1"><<</font>Bedrooms<font
size="-1">>></font>" startspan
--><%=FP_FieldVal(fp_rs,"Bedrooms")%><!--webbot
bot="DatabaseResultColumn"
endspan i-checksum="14962" --></font></td>
<td bgcolor="#FFFFFF" width="96" align="center"
height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Bathrooms" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE" clientside b-MenuFormat preview="<font
size="-1"><<</font>Bathrooms<font size="-1">>></font>"
startspan
--><%=FP_FieldVal(fp_rs,"Bathrooms")%><!--webbot
bot="DatabaseResultColumn"
endspan i-checksum="18788" --></font></td>
<td bgcolor="#FFFFFF" width="125" height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Agent" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE"
clientside b-MenuFormat preview="<font size="-1"><<</font>Agent<font
size="-1">>></font>" startspan
--><%=FP_FieldVal(fp_rs,"Agent")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="7350" --></font></td>
<td bgcolor="#FFFFFF" width="129" align="center"
height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Price" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE"
clientside b-MenuFormat preview="<font size="-1"><<</font>Price<font
size="-1">>></font>" startspan
--><%=FP_FieldVal(fp_rs,"Price")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="9640" --></font></td>
</tr>
<!--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="62730" --></tbody>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center" height="133" valign="top">
</td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</div>

</body>

</html>



:

What is the code you're using? Is your page an ASP page?

--
David Berry
FrontPage Support: http://www.frontpagemvps.com/



message
I have a column in an excel data base I'd like to present as
currency,
$xxx,xxx. I've read the posts about formating currency especially
that
from
spiderwebwoman but they seem to pertain to access. The error
message
I'm
getting suggest "format" is not a recognized commmand. FP2002.
 
The example I just posted may have word wrapped but the SELECT should all be
a single line (not two lines)

--
David Berry
FrontPage Support: http://www.frontpagemvps.com/



Daytona Steve said:
Thanks for the effort on this but no joy so far......

this is the modified code: ( removed the gray code so it would stick)

<% 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 Description, Office, Bedroom, Bathrooms, Agent,
Format(Price,'$#,##0.00') as PriceField FROM ""agent3"" ORDER BY Price
DESC"
fp_sDefault=""
fp_sNoRecords="<tr><td colspan=6 align=left width=""100%"">No records
returned.</td></tr>"
fp_sDataConn="Database2"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice="Description"
fp_sMenuValue="Description"
fp_sColTypes="&Description=200&Office=200&Bedrooms=5&Bathrooms=5&Agent=200&Price=6&"
fp_iDisplayCols=6
fp_fCustomQuery=False
BOTID=1
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="35829" --><tr>
<td bgcolor="#FFFFFF" width="152" height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Description" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE" clientside b-MenuFormat preview="<font
size="-1">&lt;&lt;</font>Description<font size="-1">&gt;&gt;</font>"
startspan --><%=FP_FieldVal(fp_rs,"Description")%><!--webbot
bot="DatabaseResultColumn" endspan i-checksum="30092" --></font></td>
<td bgcolor="#FFFFFF" width="100" height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Office" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE"
clientside b-MenuFormat preview="<font
size="-1">&lt;&lt;</font>Office<font
size="-1">&gt;&gt;</font>" startspan
--><%=FP_FieldVal(fp_rs,"Office")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="14929" --></font></td>
<td bgcolor="#FFFFFF" width="96" align="center"
height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Bedrooms" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE"
clientside b-MenuFormat preview="<font
size="-1">&lt;&lt;</font>Bedrooms<font
size="-1">&gt;&gt;</font>" startspan
--><%=FP_FieldVal(fp_rs,"Bedrooms")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="14962" --></font></td>
<td bgcolor="#FFFFFF" width="96" align="center"
height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Bathrooms" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE" clientside b-MenuFormat preview="<font
size="-1">&lt;&lt;</font>Bathrooms<font size="-1">&gt;&gt;</font>"
startspan
--><%=FP_FieldVal(fp_rs,"Bathrooms")%><!--webbot
bot="DatabaseResultColumn"
endspan i-checksum="18788" --></font></td>
<td bgcolor="#FFFFFF" width="125" height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Agent" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>Agent<font
size="-1">&gt;&gt;</font>" startspan
--><%=FP_FieldVal(fp_rs,"Agent")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="7350" --></font></td>
<td bgcolor="#FFFFFF" width="129" align="center"
height="40">
<font color="#0B2476">
<%=FP_FieldVal(fp_rs,"PriceField")%></font></td>
</tr>
<!--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="62730" --></tbody>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center" height="133" valign="top">
</td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</div>

</body>

</html>

And this is the error I got..

http://www.bdmcdaytona.com/testcbas/listingsv2.asp

In the Page View of FP <<Price>> is missing from the Price column

David Berry said:
In your SELECT statement, instead of SELECT * put all the fields you need
and put the format statement there, ex:

SELECT Description, Office, Bedroom, Bathrooms, Agent,
Format(Price,'$#,##0.00') as PriceField FROM .........

Then where it says:

<%=FP_FieldVal(fp_rs,"Price")%>

You'd make that"

<%=FP_FieldVal(fp_rs,"PriceField")%>

If that doesn't what is the exact error message you're getting?

--
David Berry
FrontPage Support: http://www.frontpagemvps.com/



Daytona Steve said:
Yes it is a asp page. The page is

http://www.bdmcdaytona.com/testcbas/listings.asp

and I think the code you're looking for is:

<html>

<head>
<% ' FP_ASP -- ASP Automatically generated by a Frontpage Component. Do
not
Edit.
FP_LCID = 1033 %>
<meta http-equiv="Content-Language" content="en-us">
<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>Coldwell Banker All Stars Listings</title>
</head>

<body bgcolor="#C0C0C0" background="images/bgrndblack.jpg"
link="#0B2476"
vlink="#0000FF" topmargin="0" leftmargin="0">

<div align="center">
<center>
<table border="4" cellpadding="0" cellspacing="0"
style="border-collapse:
collapse" bordercolor="#CC8637" id="AutoNumber8" width="21">
<tr>
<td width="13">
<table border="0" cellpadding="0" cellspacing="0"
style="border-collapse:
collapse" id="AutoNumber1" width="867" height="359" bgcolor="#000000">
<tr>
<td colspan="2" width="867" height="1" align="center"
valign="top">
<img border="0" src="images/goldandblack3.jpg"></td>
</tr>
<tr>
<td colspan="2" width="867" height="1" align="center"
valign="top"> </td>
</tr>
<tr>
<td align="left" valign="top" rowspan="2" width="140"
height="286">
<table border="2" cellspacing="4" style="border-collapse:
collapse" bordercolor="#CC8637" cellpadding="4" id="AutoNumber7"
background="images/bgrndblackncbas.jpg">
<tr>
<td>
<!--webbot bot="Navigation" S-Type="sequence"
S-Orientation="vertical" S-Rendering="graphics" S-Theme="zero 110"
B-Include-Home="FALSE" B-Include-Up="FALSE" U-Page="sid:1001" --></td>
</tr>
</table>
</td>
<td align="center" height="10" valign="top">
<table border="4" cellspacing="0" id="AutoNumber2"
bordercolor="#0B2476" bgcolor="#E0E0E0" width="700"
style="border-collapse:
collapse" cellpadding="0">
<tr>
<td>
<p align="center"><b><font color="#0B2476">Coldwell Banker All
Stars
Listings</font></b></td>
</tr>
<tr>
<td>
<table width="700" cellspacing="3" bgcolor="#FFFFFF"
cellpadding="3" bordercolor="#FF0000">
<thead>
<tr>
<td bgcolor="#C0C0C0" width="152"><u><i><font
color="#0B2476">
<b>Description</b></font></i></u></td>
<td bgcolor="#C0C0C0" width="100"><u><i><font
color="#0B2476">
<b>Office</b></font></i></u></td>
<td bgcolor="#C0C0C0" width="96" align="center"><u><i>
<font
color="#0B2476"><b>Bedrooms</b></font></i></u></td>
<td bgcolor="#C0C0C0" width="96" align="center"><u><i>
<font
color="#0B2476"><b>Bathrooms</b></font></i></u></td>
<td bgcolor="#C0C0C0" width="125"><u><i><font
color="#0B2476">
<b>Agent</b></font></i></u></td>
<td bgcolor="#C0C0C0" width="129" align="center"><u><i>
<font color="#0B2476"><b>Price</b></font></i></u></td>
</tr>
</thead>
<tbody>
<!--webbot bot="DatabaseRegionStart"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-columntypes="200,200,5,5,200,6" s-dataconnection="Database2"
b-tableformat="TRUE" b-menuformat="FALSE" s-menuchoice="Description"
s-menuvalue="Description" b-tableborder="FALSE" b-tableexpand="FALSE"
b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE"
i-listformat="0" b-makeform="TRUE" s-recordsource="agent3"
s-displaycolumns="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-criteria s-order="[Price] -" s-sql="SELECT * FROM "agent3"
ORDER
BY Price DESC" b-procedure="FALSE" clientside suggestedext="asp"
s-defaultfields s-norecordsfound="No records returned."
i-maxrecords="256"
i-groupsize="0" botid="1" 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. 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>"
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="SELECT * FROM ""agent3"" ORDER BY Price DESC"
fp_sDefault=""
fp_sNoRecords="<tr><td colspan=6 align=left width=""100%"">No records
returned.</td></tr>"
fp_sDataConn="Database2"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice="Description"
fp_sMenuValue="Description"
fp_sColTypes="&Description=200&Office=200&Bedrooms=5&Bathrooms=5&Agent=200&Price=6&"
fp_iDisplayCols=6
fp_fCustomQuery=False
BOTID=1
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="35829" --><tr>
<td bgcolor="#FFFFFF" width="152" height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Description" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE" clientside b-MenuFormat preview="<font
size="-1"><<</font>Description<font size="-1">>></font>"
startspan --><%=FP_FieldVal(fp_rs,"Description")%><!--webbot
bot="DatabaseResultColumn" endspan i-checksum="30092" --></font></td>
<td bgcolor="#FFFFFF" width="100" height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Office" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE"
clientside b-MenuFormat preview="<font
size="-1"><<</font>Office<font
size="-1">>></font>" startspan
--><%=FP_FieldVal(fp_rs,"Office")%><!--webbot
bot="DatabaseResultColumn"
endspan i-checksum="14929" --></font></td>
<td bgcolor="#FFFFFF" width="96" align="center"
height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Bedrooms" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE"
clientside b-MenuFormat preview="<font
size="-1"><<</font>Bedrooms<font
size="-1">>></font>" startspan
--><%=FP_FieldVal(fp_rs,"Bedrooms")%><!--webbot
bot="DatabaseResultColumn"
endspan i-checksum="14962" --></font></td>
<td bgcolor="#FFFFFF" width="96" align="center"
height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Bathrooms" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE" clientside b-MenuFormat preview="<font
size="-1"><<</font>Bathrooms<font size="-1">>></font>"
startspan
--><%=FP_FieldVal(fp_rs,"Bathrooms")%><!--webbot
bot="DatabaseResultColumn"
endspan i-checksum="18788" --></font></td>
<td bgcolor="#FFFFFF" width="125" height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Agent" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE"
clientside b-MenuFormat preview="<font size="-1"><<</font>Agent<font
size="-1">>></font>" startspan
--><%=FP_FieldVal(fp_rs,"Agent")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="7350" --></font></td>
<td bgcolor="#FFFFFF" width="129" align="center"
height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Price" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE"
clientside b-MenuFormat preview="<font size="-1"><<</font>Price<font
size="-1">>></font>" startspan
--><%=FP_FieldVal(fp_rs,"Price")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="9640" --></font></td>
</tr>
<!--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="62730" --></tbody>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center" height="133" valign="top">
</td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</div>

</body>

</html>



:

What is the code you're using? Is your page an ASP page?

--
David Berry
FrontPage Support: http://www.frontpagemvps.com/



message
I have a column in an excel data base I'd like to present as
currency,
$xxx,xxx. I've read the posts about formating currency especially
that
from
spiderwebwoman but they seem to pertain to access. The error
message
I'm
getting suggest "format" is not a recognized commmand. FP2002.
 
Thanks for the quick repsonse.

I made the correction to all one line. Different error message still at:

http://www.bdmcdaytona.com/testcbas/listingsv2.asp

I don't know if it matters but in the folder list, all the asp pages have a
samll yellow icon beside the file name, look like a daisy. This one does
not.

</thead>
<tbody>

<% 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 Description, Office, Bedroom, Bathrooms, Agent,
Format(Price,'$#,##0.00') as PriceField FROM ""agent3"" ORDER BY Price DESC"
fp_sDefault=""
fp_sNoRecords="<tr><td colspan=6 align=left width=""100%"">No records
returned.</td></tr>"
fp_sDataConn="Database2"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice="Description"
fp_sMenuValue="Description"
fp_sColTypes="&Description=200&Office=200&Bedrooms=5&Bathrooms=5&Agent=200&Price=6&"
fp_iDisplayCols=6
fp_fCustomQuery=False
BOTID=1
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="35829" --><tr>
<td bgcolor="#FFFFFF" width="152" height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Description" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE" clientside b-MenuFormat preview="<font
size="-1">&lt;&lt;</font>Description<font size="-1">&gt;&gt;</font>"
startspan --><%=FP_FieldVal(fp_rs,"Description")%><!--webbot
bot="DatabaseResultColumn" endspan i-checksum="30092" --></font></td>
<td bgcolor="#FFFFFF" width="100" height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Office" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>Office<font
size="-1">&gt;&gt;</font>" startspan
--><%=FP_FieldVal(fp_rs,"Office")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="14929" --></font></td>
<td bgcolor="#FFFFFF" width="96" align="center" height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Bedrooms" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>Bedrooms<font
size="-1">&gt;&gt;</font>" startspan
--><%=FP_FieldVal(fp_rs,"Bedrooms")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="14962" --></font></td>
<td bgcolor="#FFFFFF" width="96" align="center" height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Bathrooms" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE" clientside b-MenuFormat preview="<font
size="-1">&lt;&lt;</font>Bathrooms<font size="-1">&gt;&gt;</font>" startspan
--><%=FP_FieldVal(fp_rs,"Bathrooms")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="18788" --></font></td>
<td bgcolor="#FFFFFF" width="125" height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Agent" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>Agent<font
size="-1">&gt;&gt;</font>" startspan
--><%=FP_FieldVal(fp_rs,"Agent")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="7350" --></font></td>
<td bgcolor="#FFFFFF" width="129" align="center" height="40">
<font color="#0B2476">
<%=FP_FieldVal(fp_rs,"PriceField")%></font></td>
</tr>
<!--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="62730" --></tbody>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center" height="133" valign="top">
</td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</div>

</body>

</html>



David Berry said:
The example I just posted may have word wrapped but the SELECT should all be
a single line (not two lines)

--
David Berry
FrontPage Support: http://www.frontpagemvps.com/



Daytona Steve said:
Thanks for the effort on this but no joy so far......

this is the modified code: ( removed the gray code so it would stick)

<% 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 Description, Office, Bedroom, Bathrooms, Agent,
Format(Price,'$#,##0.00') as PriceField FROM ""agent3"" ORDER BY Price
DESC"
fp_sDefault=""
fp_sNoRecords="<tr><td colspan=6 align=left width=""100%"">No records
returned.</td></tr>"
fp_sDataConn="Database2"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice="Description"
fp_sMenuValue="Description"
fp_sColTypes="&Description=200&Office=200&Bedrooms=5&Bathrooms=5&Agent=200&Price=6&"
fp_iDisplayCols=6
fp_fCustomQuery=False
BOTID=1
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="35829" --><tr>
<td bgcolor="#FFFFFF" width="152" height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Description" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE" clientside b-MenuFormat preview="<font
size="-1"><<</font>Description<font size="-1">>></font>"
startspan --><%=FP_FieldVal(fp_rs,"Description")%><!--webbot
bot="DatabaseResultColumn" endspan i-checksum="30092" --></font></td>
<td bgcolor="#FFFFFF" width="100" height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Office" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE"
clientside b-MenuFormat preview="<font
size="-1"><<</font>Office<font
size="-1">>></font>" startspan
--><%=FP_FieldVal(fp_rs,"Office")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="14929" --></font></td>
<td bgcolor="#FFFFFF" width="96" align="center"
height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Bedrooms" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE"
clientside b-MenuFormat preview="<font
size="-1"><<</font>Bedrooms<font
size="-1">>></font>" startspan
--><%=FP_FieldVal(fp_rs,"Bedrooms")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="14962" --></font></td>
<td bgcolor="#FFFFFF" width="96" align="center"
height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Bathrooms" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE" clientside b-MenuFormat preview="<font
size="-1"><<</font>Bathrooms<font size="-1">>></font>"
startspan
--><%=FP_FieldVal(fp_rs,"Bathrooms")%><!--webbot
bot="DatabaseResultColumn"
endspan i-checksum="18788" --></font></td>
<td bgcolor="#FFFFFF" width="125" height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Agent" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
clientside b-MenuFormat preview="<font size="-1"><<</font>Agent<font
size="-1">>></font>" startspan
--><%=FP_FieldVal(fp_rs,"Agent")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="7350" --></font></td>
<td bgcolor="#FFFFFF" width="129" align="center"
height="40">
<font color="#0B2476">
<%=FP_FieldVal(fp_rs,"PriceField")%></font></td>
</tr>
<!--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="62730" --></tbody>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center" height="133" valign="top">
</td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</div>

</body>

</html>

And this is the error I got..

http://www.bdmcdaytona.com/testcbas/listingsv2.asp

In the Page View of FP <<Price>> is missing from the Price column

David Berry said:
In your SELECT statement, instead of SELECT * put all the fields you need
and put the format statement there, ex:

SELECT Description, Office, Bedroom, Bathrooms, Agent,
Format(Price,'$#,##0.00') as PriceField FROM .........

Then where it says:

<%=FP_FieldVal(fp_rs,"Price")%>

You'd make that"

<%=FP_FieldVal(fp_rs,"PriceField")%>

If that doesn't what is the exact error message you're getting?

--
David Berry
FrontPage Support: http://www.frontpagemvps.com/



Yes it is a asp page. The page is

http://www.bdmcdaytona.com/testcbas/listings.asp

and I think the code you're looking for is:

<html>

<head>
<% ' FP_ASP -- ASP Automatically generated by a Frontpage Component. Do
not
Edit.
FP_LCID = 1033 %>
<meta http-equiv="Content-Language" content="en-us">
<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>Coldwell Banker All Stars Listings</title>
</head>

<body bgcolor="#C0C0C0" background="images/bgrndblack.jpg"
link="#0B2476"
vlink="#0000FF" topmargin="0" leftmargin="0">

<div align="center">
<center>
<table border="4" cellpadding="0" cellspacing="0"
style="border-collapse:
collapse" bordercolor="#CC8637" id="AutoNumber8" width="21">
<tr>
<td width="13">
<table border="0" cellpadding="0" cellspacing="0"
style="border-collapse:
collapse" id="AutoNumber1" width="867" height="359" bgcolor="#000000">
<tr>
<td colspan="2" width="867" height="1" align="center"
valign="top">
<img border="0" src="images/goldandblack3.jpg"></td>
</tr>
<tr>
<td colspan="2" width="867" height="1" align="center"
valign="top"> </td>
</tr>
<tr>
<td align="left" valign="top" rowspan="2" width="140"
height="286">
<table border="2" cellspacing="4" style="border-collapse:
collapse" bordercolor="#CC8637" cellpadding="4" id="AutoNumber7"
background="images/bgrndblackncbas.jpg">
<tr>
<td>
<!--webbot bot="Navigation" S-Type="sequence"
S-Orientation="vertical" S-Rendering="graphics" S-Theme="zero 110"
B-Include-Home="FALSE" B-Include-Up="FALSE" U-Page="sid:1001" --></td>
</tr>
</table>
</td>
<td align="center" height="10" valign="top">
<table border="4" cellspacing="0" id="AutoNumber2"
bordercolor="#0B2476" bgcolor="#E0E0E0" width="700"
style="border-collapse:
collapse" cellpadding="0">
<tr>
<td>
<p align="center"><b><font color="#0B2476">Coldwell Banker All
Stars
Listings</font></b></td>
</tr>
<tr>
<td>
<table width="700" cellspacing="3" bgcolor="#FFFFFF"
cellpadding="3" bordercolor="#FF0000">
<thead>
<tr>
<td bgcolor="#C0C0C0" width="152"><u><i><font
color="#0B2476">
<b>Description</b></font></i></u></td>
<td bgcolor="#C0C0C0" width="100"><u><i><font
color="#0B2476">
<b>Office</b></font></i></u></td>
<td bgcolor="#C0C0C0" width="96" align="center"><u><i>
<font
color="#0B2476"><b>Bedrooms</b></font></i></u></td>
<td bgcolor="#C0C0C0" width="96" align="center"><u><i>
<font
color="#0B2476"><b>Bathrooms</b></font></i></u></td>
<td bgcolor="#C0C0C0" width="125"><u><i><font
color="#0B2476">
<b>Agent</b></font></i></u></td>
<td bgcolor="#C0C0C0" width="129" align="center"><u><i>
<font color="#0B2476"><b>Price</b></font></i></u></td>
</tr>
</thead>
<tbody>
<!--webbot bot="DatabaseRegionStart"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-columntypes="200,200,5,5,200,6" s-dataconnection="Database2"
b-tableformat="TRUE" b-menuformat="FALSE" s-menuchoice="Description"
s-menuvalue="Description" b-tableborder="FALSE" b-tableexpand="FALSE"
b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE"
i-listformat="0" b-makeform="TRUE" s-recordsource="agent3"
s-displaycolumns="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-criteria s-order="[Price] -" s-sql="SELECT * FROM "agent3"
ORDER
BY Price DESC" b-procedure="FALSE" clientside suggestedext="asp"
s-defaultfields s-norecordsfound="No records returned."
i-maxrecords="256"
i-groupsize="0" botid="1" 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. 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>"
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
 
Look inside the include page _fpclass/fpdbrgn1.inc and see if there's a
LOCID line in there or see what's on line 3. If there is, let us know what
it says or comment it out by putting a single quote ' in front of the line.

--
David Berry
FrontPage Support: http://www.frontpagemvps.com/



Daytona Steve said:
Thanks for the quick repsonse.

I made the correction to all one line. Different error message still at:

http://www.bdmcdaytona.com/testcbas/listingsv2.asp

I don't know if it matters but in the folder list, all the asp pages have
a
samll yellow icon beside the file name, look like a daisy. This one does
not.

</thead>
<tbody>

<% 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 Description, Office, Bedroom, Bathrooms, Agent,
Format(Price,'$#,##0.00') as PriceField FROM ""agent3"" ORDER BY Price
DESC"
fp_sDefault=""
fp_sNoRecords="<tr><td colspan=6 align=left width=""100%"">No records
returned.</td></tr>"
fp_sDataConn="Database2"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice="Description"
fp_sMenuValue="Description"
fp_sColTypes="&Description=200&Office=200&Bedrooms=5&Bathrooms=5&Agent=200&Price=6&"
fp_iDisplayCols=6
fp_fCustomQuery=False
BOTID=1
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="35829" --><tr>
<td bgcolor="#FFFFFF" width="152" height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Description" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE" clientside b-MenuFormat preview="<font
size="-1">&lt;&lt;</font>Description<font size="-1">&gt;&gt;</font>"
startspan --><%=FP_FieldVal(fp_rs,"Description")%><!--webbot
bot="DatabaseResultColumn" endspan i-checksum="30092" --></font></td>
<td bgcolor="#FFFFFF" width="100" height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Office" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE"
clientside b-MenuFormat preview="<font
size="-1">&lt;&lt;</font>Office<font
size="-1">&gt;&gt;</font>" startspan
--><%=FP_FieldVal(fp_rs,"Office")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="14929" --></font></td>
<td bgcolor="#FFFFFF" width="96" align="center"
height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Bedrooms" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE"
clientside b-MenuFormat preview="<font
size="-1">&lt;&lt;</font>Bedrooms<font
size="-1">&gt;&gt;</font>" startspan
--><%=FP_FieldVal(fp_rs,"Bedrooms")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="14962" --></font></td>
<td bgcolor="#FFFFFF" width="96" align="center"
height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Bathrooms" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE" clientside b-MenuFormat preview="<font
size="-1">&lt;&lt;</font>Bathrooms<font size="-1">&gt;&gt;</font>"
startspan
--><%=FP_FieldVal(fp_rs,"Bathrooms")%><!--webbot
bot="DatabaseResultColumn"
endspan i-checksum="18788" --></font></td>
<td bgcolor="#FFFFFF" width="125" height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Agent" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>Agent<font
size="-1">&gt;&gt;</font>" startspan
--><%=FP_FieldVal(fp_rs,"Agent")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="7350" --></font></td>
<td bgcolor="#FFFFFF" width="129" align="center"
height="40">
<font color="#0B2476">
<%=FP_FieldVal(fp_rs,"PriceField")%></font></td>
</tr>
<!--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="62730" --></tbody>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center" height="133" valign="top">
</td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</div>

</body>

</html>



David Berry said:
The example I just posted may have word wrapped but the SELECT should all
be
a single line (not two lines)

--
David Berry
FrontPage Support: http://www.frontpagemvps.com/



Daytona Steve said:
Thanks for the effort on this but no joy so far......

this is the modified code: ( removed the gray code so it would stick)

<% 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 Description, Office, Bedroom, Bathrooms, Agent,
Format(Price,'$#,##0.00') as PriceField FROM ""agent3"" ORDER BY Price
DESC"
fp_sDefault=""
fp_sNoRecords="<tr><td colspan=6 align=left width=""100%"">No records
returned.</td></tr>"
fp_sDataConn="Database2"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice="Description"
fp_sMenuValue="Description"
fp_sColTypes="&Description=200&Office=200&Bedrooms=5&Bathrooms=5&Agent=200&Price=6&"
fp_iDisplayCols=6
fp_fCustomQuery=False
BOTID=1
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="35829" --><tr>
<td bgcolor="#FFFFFF" width="152" height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Description" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE" clientside b-MenuFormat preview="<font
size="-1"><<</font>Description<font size="-1">>></font>"
startspan --><%=FP_FieldVal(fp_rs,"Description")%><!--webbot
bot="DatabaseResultColumn" endspan i-checksum="30092" --></font></td>
<td bgcolor="#FFFFFF" width="100" height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Office" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE"
clientside b-MenuFormat preview="<font
size="-1"><<</font>Office<font
size="-1">>></font>" startspan
--><%=FP_FieldVal(fp_rs,"Office")%><!--webbot
bot="DatabaseResultColumn"
endspan i-checksum="14929" --></font></td>
<td bgcolor="#FFFFFF" width="96" align="center"
height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Bedrooms" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE"
clientside b-MenuFormat preview="<font
size="-1"><<</font>Bedrooms<font
size="-1">>></font>" startspan
--><%=FP_FieldVal(fp_rs,"Bedrooms")%><!--webbot
bot="DatabaseResultColumn"
endspan i-checksum="14962" --></font></td>
<td bgcolor="#FFFFFF" width="96" align="center"
height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Bathrooms" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE" clientside b-MenuFormat preview="<font
size="-1"><<</font>Bathrooms<font size="-1">>></font>"
startspan
--><%=FP_FieldVal(fp_rs,"Bathrooms")%><!--webbot
bot="DatabaseResultColumn"
endspan i-checksum="18788" --></font></td>
<td bgcolor="#FFFFFF" width="125" height="40">
<font color="#0B2476">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-column="Agent" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE"
clientside b-MenuFormat preview="<font size="-1"><<</font>Agent<font
size="-1">>></font>" startspan
--><%=FP_FieldVal(fp_rs,"Agent")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="7350" --></font></td>
<td bgcolor="#FFFFFF" width="129" align="center"
height="40">
<font color="#0B2476">
<%=FP_FieldVal(fp_rs,"PriceField")%></font></td>
</tr>
<!--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="62730" --></tbody>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center" height="133" valign="top">
</td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</div>

</body>

</html>

And this is the error I got..

http://www.bdmcdaytona.com/testcbas/listingsv2.asp

In the Page View of FP <<Price>> is missing from the Price column

:

In your SELECT statement, instead of SELECT * put all the fields you
need
and put the format statement there, ex:

SELECT Description, Office, Bedroom, Bathrooms, Agent,
Format(Price,'$#,##0.00') as PriceField FROM .........

Then where it says:

<%=FP_FieldVal(fp_rs,"Price")%>

You'd make that"

<%=FP_FieldVal(fp_rs,"PriceField")%>

If that doesn't what is the exact error message you're getting?

--
David Berry
FrontPage Support: http://www.frontpagemvps.com/



message
Yes it is a asp page. The page is

http://www.bdmcdaytona.com/testcbas/listings.asp

and I think the code you're looking for is:

<html>

<head>
<% ' FP_ASP -- ASP Automatically generated by a Frontpage Component.
Do
not
Edit.
FP_LCID = 1033 %>
<meta http-equiv="Content-Language" content="en-us">
<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>Coldwell Banker All Stars Listings</title>
</head>

<body bgcolor="#C0C0C0" background="images/bgrndblack.jpg"
link="#0B2476"
vlink="#0000FF" topmargin="0" leftmargin="0">

<div align="center">
<center>
<table border="4" cellpadding="0" cellspacing="0"
style="border-collapse:
collapse" bordercolor="#CC8637" id="AutoNumber8" width="21">
<tr>
<td width="13">
<table border="0" cellpadding="0" cellspacing="0"
style="border-collapse:
collapse" id="AutoNumber1" width="867" height="359"
bgcolor="#000000">
<tr>
<td colspan="2" width="867" height="1" align="center"
valign="top">
<img border="0" src="images/goldandblack3.jpg"></td>
</tr>
<tr>
<td colspan="2" width="867" height="1" align="center"
valign="top"> </td>
</tr>
<tr>
<td align="left" valign="top" rowspan="2" width="140"
height="286">
<table border="2" cellspacing="4" style="border-collapse:
collapse" bordercolor="#CC8637" cellpadding="4" id="AutoNumber7"
background="images/bgrndblackncbas.jpg">
<tr>
<td>
<!--webbot bot="Navigation" S-Type="sequence"
S-Orientation="vertical" S-Rendering="graphics" S-Theme="zero 110"
B-Include-Home="FALSE" B-Include-Up="FALSE"
U-Page="sid:1001" --></td>
</tr>
</table>
</td>
<td align="center" height="10" valign="top">
<table border="4" cellspacing="0" id="AutoNumber2"
bordercolor="#0B2476" bgcolor="#E0E0E0" width="700"
style="border-collapse:
collapse" cellpadding="0">
<tr>
<td>
<p align="center"><b><font color="#0B2476">Coldwell Banker
All
Stars
Listings</font></b></td>
</tr>
<tr>
<td>
<table width="700" cellspacing="3" bgcolor="#FFFFFF"
cellpadding="3" bordercolor="#FF0000">
<thead>
<tr>
<td bgcolor="#C0C0C0" width="152"><u><i><font
color="#0B2476">
<b>Description</b></font></i></u></td>
<td bgcolor="#C0C0C0" width="100"><u><i><font
color="#0B2476">
<b>Office</b></font></i></u></td>
<td bgcolor="#C0C0C0" width="96"
align="center"><u><i>
<font
color="#0B2476"><b>Bedrooms</b></font></i></u></td>
<td bgcolor="#C0C0C0" width="96"
align="center"><u><i>
<font
color="#0B2476"><b>Bathrooms</b></font></i></u></td>
<td bgcolor="#C0C0C0" width="125"><u><i><font
color="#0B2476">
<b>Agent</b></font></i></u></td>
<td bgcolor="#C0C0C0" width="129"
align="center"><u><i>
<font
color="#0B2476"><b>Price</b></font></i></u></td>
</tr>
</thead>
<tbody>
<!--webbot bot="DatabaseRegionStart"
s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-columntypes="200,200,5,5,200,6" s-dataconnection="Database2"
b-tableformat="TRUE" b-menuformat="FALSE" s-menuchoice="Description"
s-menuvalue="Description" b-tableborder="FALSE"
b-tableexpand="FALSE"
b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE"
i-listformat="0" b-makeform="TRUE" s-recordsource="agent3"
s-displaycolumns="Description,Office,Bedrooms,Bathrooms,Agent,Price"
s-criteria s-order="[Price] -" s-sql="SELECT * FROM "agent3"
ORDER
BY Price DESC" b-procedure="FALSE" clientside suggestedext="asp"
s-defaultfields s-norecordsfound="No records returned."
i-maxrecords="256"
i-groupsize="0" botid="1" 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. 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>"
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
 
OK, I searched the text and did not find LOCID. When I opened this file, the
third line already had a single quote,

Here is the text of the file:

<%

FP_SetLocaleForPage

' determine whether or not to provide navigation controls
if fp_iPageSize > 0 then
fp_fShowNavbar = True
else
fp_fShowNavbar = False
end if

fp_sPagePath = Request.ServerVariables("PATH_INFO")
fp_sEnvKey = fp_sPagePath & "#fpdbr_" & fp_iRegion
fp_sFormName = "fpdbr_" & CStr(fp_iRegion)
fp_sFormKey = fp_sFormName & "_PagingMove"

fp_sInputs = fp_sDefault

fp_DEBUG = False

fp_sFirstLabel = " |< "
fp_sPrevLabel = " < "
fp_sNextLabel = " > "
fp_sLastLabel = " >| "
fp_sDashLabel = " -- "

if not IsEmpty(Request(fp_sFormKey)) then
fp_sMoveType = Request(fp_sFormKey)
else
fp_sMoveType = ""
end if

fp_iCurrent=1
fp_fError=False
fp_bBlankField=False
Set fp_dictInputs = Server.CreateObject("Scripting.Dictionary")
Set fp_dictParams = Server.CreateObject("Scripting.Dictionary")
Set fp_dictColTypes = Server.CreateObject("Scripting.Dictionary")
fp_iParam = 1

fp_sQry = FP_ReplaceQuoteChars(fp_sQry)

' replace any input parameters in query string
' there need to be at least 5 more characters in the string for there to be
input parameters (::[_a-z]::)
Do While (Not fp_fError) And (fp_iCurrent + 5 < Len(fp_sQry) And
Instr(fp_iCurrent, fp_sQry, "::") > 0)
fp_iMax = Len(fp_sQry) + 1
fp_iColonStart = Instr(fp_iCurrent, fp_sQry, "::")
fp_iSQuoteStart = Instr(fp_iCurrent, fp_sQry, "'")
fp_iDQuoteStart = Instr(fp_iCurrent, fp_sQry, """")

If (fp_iSQuoteStart = 0) then
fp_iSQuoteStart = fp_iMax
End If
If (fp_iDQuoteStart = 0) then
fp_iDQuoteStart = fp_iMax
End If

fp_sQuoteDelim = ""
fp_iQuoteStart = -1
fp_iQuoteEnd = fp_iMax
fp_bQuoteFound = false
If (fp_iColonStart > fp_iSQuoteStart and fp_iDQuoteStart > fp_iSQuoteStart)
then 'single quote is first sought for character
fp_sQuoteDelim = "'"
fp_iQuoteStart = fp_iSQuoteStart
elseIf (fp_iColonStart > fp_iDQuoteStart and fp_iSQuoteStart >
fp_iDQuoteStart) then 'double quote is first sought for character
fp_sQuoteDelim = """"
fp_iQuoteStart = fp_iDQuoteStart
else
'The :: comes before any ' or "
End If

If(fp_sQuoteDelim <> "") then
fp_iPotQuoteEnd = fp_iQuoteStart + 1
Do While (fp_bQuoteFound = false and fp_iPotQuoteEnd < fp_iMax)
fp_iPotQuoteEnd = Instr(fp_iPotQuoteEnd, fp_sQry, fp_sQuoteDelim)

If(fp_iPotQuoteEnd = 0) then
exit do
End If

If(fp_iPotQuoteEnd = fp_iMax - 1) then
fp_iQuoteEnd = fp_iPotQuoteEnd
fp_bQuoteFound = true
exit do
End If

If(Mid(fp_sQry, fp_iPotQuoteEnd + 1, 1) <> fp_sQuoteDelim) then
fp_iQuoteEnd = fp_iPotQuoteEnd
fp_bQuoteFound = true
else
fp_iPotQuoteEnd = fp_iPotQuoteEnd + 2
End If
Loop

If(fp_bQuoteFound = false) then
Err.Description = "Unable to find a matching quote for " & fp_sQuoteDelim
& " in the query."
fp_fError = true
fp_bSkip = true
End If

If(fp_iColonStart > fp_iQuoteEnd) then 'there is no user input in this
literal string
fp_iCurrent = fp_iQuoteEnd + 1
fp_bSkip = true
End If

else
fp_iQuoteStart = fp_iColonStart
fp_bQuoteFound = false
End If

If not fp_bSkip then
fp_iStart = fp_iColonStart
' found a opening ::, find the close ::
fp_iEnd = InStr(fp_iStart + 2, fp_sQry, "::")

If not fp_bQuoteFound then
fp_iQuoteEnd = fp_iEnd + 1
End If
If fp_iEnd = 0 Then
fp_fError = True
Response.Write "<B>Database Results Error: mismatched parameter
delimiters</B>"
Else
fp_sField = Mid(fp_sQry, fp_iStart + 2, fp_iEnd - fp_iStart - 2)
fp_sValue = Request.Form(fp_sField)
if len(fp_sValue) = 0 then fp_sValue = Request.QueryString(fp_sField)

' if the named form field doesn't exist, make a note of it
If (len(fp_sValue) = 0) Then
fp_iStartField = InStr(fp_sDefault, fp_sField & "=")
if fp_iStartField > 0 then
fp_iStartField = fp_iStartField + len(fp_sField) + 1
fp_iEndField = InStr(fp_iStartField,fp_sDefault,"&")
if fp_iEndField > 0 then
fp_sValue = Mid(fp_sDefault,fp_iStartField,fp_iEndField -
fp_iStartField)
else
fp_sValue = Mid(fp_sDefault,fp_iStartField)
end if
end if
End If

' remember names and values used in query
if not fp_dictInputs.Exists(fp_sField) then
fp_dictInputs.Add fp_sField, fp_sValue
end if

if (len(fp_sValue) = 0) Then fp_bBlankField = True

fp_iOpEnd = fp_iQuoteStart - 1

Do While (Mid (fp_sQry , fp_iOpEnd , 1) = " ")
fp_iOpEnd = fp_iOpEnd - 1
Loop

fp_iFieldEnd = fp_iOpEnd
If ( Mid(fp_sQry, fp_iOpEnd - 1, 2) = "<=") then
fp_iFieldEnd = fp_iOpEnd - 2
ElseIf (Mid(fp_sQry, fp_iOpEnd - 1, 2) = ">=") then
fp_iFieldEnd = fp_iOpEnd - 2
ElseIf (Mid(fp_sQry, fp_iOpEnd - 1, 2) = "<>") then
fp_iFieldEnd = fp_iOpEnd - 2
ElseIf (UCase(Mid(fp_sQry, fp_iOpEnd - 3, 4)) = "LIKE" ) then
fp_iFieldEnd = fp_iOpEnd - 4
ElseIf (Mid(fp_sQry, fp_iOpEnd, 1) = "=") then
fp_iFieldEnd = fp_iOpEnd - 1
ElseIf (Mid(fp_sQry, fp_iOpEnd, 1) = "<") then
fp_iFieldEnd = fp_iOpEnd - 1
ElseIf (Mid(fp_sQry, fp_iOpEnd, 1) = ">") then
fp_iFieldEnd = fp_iOpEnd - 1
End If

If(fp_iFieldEnd <> fp_iOpEnd) Then
Do While (fp_iFieldEnd) > 0 and (Mid(fp_sQry,fp_iFieldEnd,1) = " ")
fp_iFieldEnd = fp_iFieldEnd - 1
Loop
fp_colNameDelim = ""

If(fp_iFieldEnd) > 0 then
fp_sTemp = Mid(fp_sQry,fp_iFieldEnd,1)

If(InStr("])""",fp_sTemp)) then
If(InStr("]",fp_sTemp)) then
fp_colNameDelim = ".["
ElseIf (InStr(")",fp_sTemp)) then
fp_colNameDelim = ".("
ElseIf (InStr("""",fp_sTemp)) then
fp_colNameDelim = "."""
End If
'In the End, we ignore the 'quote' character
fp_iFieldEnd = fp_iFieldEnd - 1
End If
End If

fp_iFieldStart = fp_iFieldEnd
If (fp_colNameDelim = "") then
fp_colNameDelim = " (."
End If

DO while (fp_iFieldStart > 0 and InStr(fp_colNameDelim,
Mid(fp_sQry,fp_iFieldStart,1)) = 0)
fp_iFieldStart = fp_iFieldStart - 1
Loop

fp_iFieldStart = fp_iFieldStart + 1

fp_sColName = Mid(fp_sQry, fp_iFieldStart, fp_iFieldEnd - fp_iFieldStart
+ 1)

If( "NOT" = UCase(fp_sColName)) then
fp_iFieldEnd = fp_iFieldStart - 1
Do While (fp_iFieldEnd) > 0 and (Mid(fp_sQry,fp_iFieldEnd,1) = " ")
fp_iFieldEnd = fp_iFieldEnd - 1
Loop

fp_colNameDelim = ""

If(fp_iFieldEnd) > 0 then
fp_sTemp = Mid(fp_sQry,fp_iFieldEnd,1)

If(InStr("])""",fp_sTemp)) then
If(InStr("]",fp_sTemp)) then
fp_colNameDelim = ".["
ElseIf (InStr(")",fp_sTemp)) then
fp_colNameDelim = ".("
ElseIf (InStr("""",fp_sTemp)) then
fp_colNameDelim = "."""
End If
'In the End, we ignore the 'quote' character
fp_iFieldEnd = fp_iFieldEnd - 1
End If
End If

fp_iFieldStart = fp_iFieldEnd
If(fp_colNameDelim = "") Then
fp_colNameDelim = " (."
End If

Do while (fp_iFieldStart > 0 and InStr(fp_colNameDelim,
Mid(fp_sQry,fp_iFieldStart,1)) = 0)
fp_iFieldStart = fp_iFieldStart - 1
Loop
fp_iFieldStart = fp_iFieldStart + 1

fp_sColName = Mid(fp_sQry, fp_iFieldStart, fp_iFieldEnd - fp_iFieldStart
+ 1)
End If

fp_sColName = Replace(fp_sColName, "[", "")
fp_sColName = Replace(fp_sColName, "]", "")

fp_colType = ""
fp_iStartField = InStr(fp_sColTypes, "&" & fp_sColName & "=")
If fp_iStartField > 0 Then
fp_iStartField = fp_iStartField + len(fp_sColName) + 2
fp_iEndField = InStr(fp_iStartField,fp_sColTypes,"&")
If fp_iEndField > 0 Then
fp_colType = Mid(fp_sColTypes,fp_iStartField,fp_iEndField -
fp_iStartField)
else
Err.Description = "fp_sColTypes appears to be malformed.<br>"
Err.Description = Err.Description & "This could happen if your
DatabaseRegionStart webbot has an empty or missing s-columnnames or
s-columntypes attributes.<br>"
Err.Description = Err.Description & "You may need to read Microsoft
Knowledge Base Article 817029.<br>"

fp_fError = true
End If
End If

If(Len(fp_colType) > 0 and IsNumeric(fp_colType)) Then
fp_dictColTypes.Add fp_iParam, fp_colType

'Remove single quotes around strings
select case fp_colType
case 129, 200, 201, 130, 202, 203 ' adChar, adVarChar, adLongVarChar,
adWChar, adVarWChar, adLongVarWChar
If not fp_bQuoteFound and Left(fp_sValue, 1) = "'" or Left(fp_sValue,
1) = """" Then
fp_sValue = Mid(fp_sValue,2,Len(fp_sValue)-2)
End If
case else
' do nothing
End select

If fp_sQuoteDelim = """" Then
fp_sValue = Replace(fp_sValue, """""", """")
ElseIf fp_sQuoteDelim = "'" Then
fp_sValue = Replace(fp_sValue, "''", "'")
End If

If (fp_bQuoteFound) then
fp_sLead = Mid(fp_sQry, fp_iQuoteStart + 1, fp_iColonStart -
fp_iQuoteStart -1)
fp_sTail = Mid(fp_sQry, fp_iEnd + 2, fp_iQuoteEnd - fp_iEnd - 2)
If fp_sQuoteDelim = """" Then
fp_sLead = Replace(fp_sLead, """""", """")
fp_sTail = Replace(fp_sTail, """""", """")
ElseIf fp_sQuoteDelim = "'" Then
fp_sLead = Replace(fp_sLead, "''", "'")
fp_sTail = Replace(fp_sTail, "''", "'")
End If

fp_sValue = fp_sLead & fp_sValue & fp_sTail
End If

fp_dictParams.Add fp_iParam, fp_sValue
fp_iParam = fp_iParam + 1
fp_sValue = "?"
else
' this next finds the named form field value, and substitutes in
' doubled single-quotes for all single quotes in the literal value
' so that SQL doesn't get confused by seeing unpaired single-quotes
Err.Description = "Your page contains a query with user input parameters
that could not be resolved.<br>"
Err.Description = Err.Description & "This could happen if your
DatabaseRegionStart webbot has an empty or missing s-columnnames or
s-columntypes attributes.<br>"
Err.Description = Err.Description & "You may need to read Microsoft
Knowledge Base Article 817029.<br>"
fp_fError = True
End If

If((Len(fp_sQry) - fp_iQuoteEnd) < 1) then
fp_sQry = Left(fp_sQry, fp_iQuoteStart - 1) & "?"
else
fp_sQry = Left(fp_sQry, fp_iQuoteStart - 1) & "?" & Right(fp_sQry,
Len(fp_sQry) - fp_iQuoteEnd)
End If
Else
fp_fError=True
Err.Description = "Unable to find operator in query string. Query string
currently is " & fp_sQry
End If

' Fixup the new current position to be after the substituted value
fp_iCurrent = fp_iQuoteStart + 1
End If
End If
fp_bSkip = false
Loop

' establish connection
If Not fp_fError Then
if Application(fp_sDataConn & "_ConnectionString") = "" then
if fp_DEBUG Then
Err.Description = "The database connection named '" & fp_sDataConn & "'
is undefined.<br><br>"
Err.Description = Err.Description & "This problem can occur if:<br>"
Err.Description = Err.Description & "* the connection has been removed
from the web<br>"
Err.Description = Err.Description & "* the file 'global.asa' is missing
or contains errors<br>"
Err.Description = Err.Description & "* the root folder does not have
Scripting permissions enabled<br>"
Err.Description = Err.Description & "* the web is not marked as an
Application Root<br>"
else
Err.Description = "The operation failed. If this continues, please
contact your server administrator.<br>"
end if
fp_fError = True
end if
if Not fp_fError then
set fp_conn = Server.CreateObject("ADODB.Connection")
fp_conn.ConnectionTimeout = Application(fp_sDataConn & "_ConnectionTimeout")
fp_conn.CommandTimeout = Application(fp_sDataConn & "_CommandTimeout")
fp_sConn = Application(fp_sDataConn & "_ConnectionString")
fp_sUid = Application(fp_sDataConn & "_RuntimeUserName")
fp_sPwd = Application(fp_sDataConn & "_RuntimePassword")
Err.Clear
FP_OpenConnection fp_conn, fp_sConn, fp_sUid, fp_sPwd, Not(fp_fCustomQuery)
if Err.Description <> "" then fp_fError = True
end if
if Not fp_fError then
set fp_cmd = Server.CreateObject("ADODB.Command")
fp_cmd.CommandText = fp_sQry
fp_cmd.CommandType = fp_iCommandType
set fp_cmd.ActiveConnection = fp_conn
set fp_rs = Server.CreateObject("ADODB.Recordset")
set fp_rs.Source = fp_cmd

On Error Resume Next
fp_iTemp = 1
Do While fp_iTemp < fp_iParam
fp_colType = fp_dictColTypes.Item(fp_iTemp)
fp_colValue = fp_dictParams.Item(fp_iTemp)

select case fp_colType
case 129, 200, 201, 130, 202, 203 ' adChar, adVarChar, adLongVarChar,
adWChar, adVarWChar, adLongVarWChar
fp_cmd.Parameters.Append = fp_cmd.CreateParameter("Field"&fp_iTemp,
fp_colType, 1, Len(fp_colValue) + 1)
case else
fp_cmd.Parameters.Append = fp_cmd.CreateParameter("Field"&fp_iTemp,
fp_colType, 1 )
end select
fp_cmd.Parameters("Field"&fp_iTemp).Value = fp_colValue
fp_iTemp = fp_iTemp + 1
LOOP
On Error Goto 0

If fp_iCommandType = 4 Then
fp_cmd.Parameters.Refresh
Do Until Len(fp_sInputs) = 0
fp_iLoc = InStr(fp_sInputs,"=")
if fp_iLoc = 0 then exit do
fp_sKey = Left(fp_sInputs,fp_iLoc - 1)
fp_sInputs = Mid(fp_sInputs,fp_iLoc + 1)
fp_iLoc = InStr(fp_sInputs,"&")
if fp_iLoc = 0 then
fp_sInpVal = fp_sInputs
fp_sInputs = ""
else
fp_sInpVal = Left(fp_sInputs,fp_iLoc - 1)
fp_sInputs = Mid(fp_sInputs,fp_iLoc + 1)
end if
fp_sVal = Request.Form(fp_sKey)
if len(fp_sVal) = 0 then fp_sVal = Request.QueryString(fp_sKey)
if len(fp_sVal) = 0 then fp_sVal = fp_sInpVal
fp_pType = fp_cmd.Parameters(fp_sKey).Type
select case fp_pType
case 129, 200, 201, 130, 202, 203 ' adChar, adVarChar, adLongVarChar,
adWChar, adVarWChar, adLongVarWChar
fp_cmd.Parameters(fp_sKey).Size = Len(fp_sVal) + 1
case else
' do nothing
end select

' remember names and values used in query
if not fp_dictInputs.Exists(fp_sKey) then
fp_dictInputs.Add fp_sKey, fp_sVal
end if

fp_cmd.Parameters(fp_sKey) = fp_sVal
Loop
End If
If fp_iMaxRecords <> 0 Then fp_rs.MaxRecords = fp_iMaxRecords

FP_SetCursorProperties(fp_rs)

FP_OpenRecordset(fp_rs)
end if

if(Err.Description = "" ) then
' Check for the no-record case
if fp_rs.State <> 1 then
fp_fError = True
Response.Write fp_sNoRecords
ElseIf fp_rs.EOF And fp_rs.BOF Then
fp_fError = True
Response.Write fp_sNoRecords
end if
end if
end if

If Err.Description <> "" Then
if fp_fTableFormat then
Response.Write "<tr><td colspan=" & fp_iDisplayCols & " color=#000000
bgcolor=#ffff00>"
end if
Response.Write "<tt>"
Response.Write "<b>Database Results Error</b><br>"
if fp_DEBUG Then
if Not fp_fError Then
Response.Write "<i>Description:</i> " &
Server.HtmlEncode(Err.Description) & "<br>"
Response.Write "<i>Number:</i> " & Server.HtmlEncode(Err.Number) & " (0x"
& Hex(Err.Number) & ")<br>"
Response.Write "<i>Source:</i> " & Server.HtmlEncode(Err.Source) & "<br>"
else
Response.Write Err.Description
end if
if fp_bBlankField Then
Response.Write "<br>One or more form fields were empty. You should
provide default values for all form fields that are used in the query."
end if
else
Response.Write "The operation failed. If this continues, please contact
your server administrator.<br>"
end if
Response.Write "</tt>"
if fp_fTableFormat then
Response.Write "</td></tr>"
end if
fp_fError = True
end if



' determine whether or not provider supports Absolute Positioning
if not fp_fError then
if IsObject(fp_rs) and not(fp_rs.Supports(&H00004000)) then
fp_iPageSize = 0
fp_fShowNavbar = False
end if
end if

' move to correct position in result set
if not fp_fError then

if fp_iPageSize > 0 then
fp_iAbsPage = 1
fp_sVal = Session(fp_sEnvKey)
if fp_sVal <> "" then
fp_iAbsPage = CInt(fp_sVal)
end if

fp_rs.PageSize = fp_iPageSize
if fp_iAbsPage > fp_rs.PageCount then fp_iAbsPage = fp_rs.PageCount
fp_rs.AbsolutePage = fp_iAbsPage
if fp_rs.PageCount = 1 then fp_fShowNavbar = False

select case fp_sMoveType
case ""
' do nothing
case fp_sFirstLabel
fp_rs.AbsolutePage = 1
case fp_sPrevLabel
if fp_rs.AbsolutePage > 1 then fp_rs.AbsolutePage = fp_rs.AbsolutePage - 1
case fp_sNextLabel
if fp_rs.AbsolutePage < fp_rs.PageCount then fp_rs.AbsolutePage =
fp_rs.AbsolutePage + 1
case fp_sLastLabel
fp_rs.AbsolutePage = fp_rs.PageCount
case else
' do nothing
end select

fp_iAbsPage = fp_rs.AbsolutePage
Session(fp_sEnvKey) = fp_iAbsPage
end if

end if

if fp_fError then fp_fShowNavbar = False

fp_iCount = 0
Do
if fp_fError then exit do
if fp_rs.EOF then exit do
if fp_iPageSize > 0 And fp_iCount >= fp_rs.PageSize then exit do
if fp_iMaxRecords > 0 And fp_iCount >= fp_iMaxRecords then
' MaxRecords didn't work; exit loop
fp_fShowNavbar = False
exit do
end if
%>
 
Make sure in http://www.bdmcdaytona.com/testcbas/listings.asp you have in the Head section

<%
' FP_ASP -- ASP Automatically generated by a Frontpage Component. Do not Edit.
FP_LCID=1033
%>

FP_LCID=1033
must be on a line by itself
--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


| OK, I searched the text and did not find LOCID. When I opened this file, the
| third line already had a single quote,
|
| Here is the text of the file:
|
| <%
|
| FP_SetLocaleForPage
|
| ' determine whether or not to provide navigation controls
| if fp_iPageSize > 0 then
| fp_fShowNavbar = True
| else
| fp_fShowNavbar = False
| end if
|
| fp_sPagePath = Request.ServerVariables("PATH_INFO")
| fp_sEnvKey = fp_sPagePath & "#fpdbr_" & fp_iRegion
| fp_sFormName = "fpdbr_" & CStr(fp_iRegion)
| fp_sFormKey = fp_sFormName & "_PagingMove"
|
| fp_sInputs = fp_sDefault
|
| fp_DEBUG = False
|
| fp_sFirstLabel = " |< "
| fp_sPrevLabel = " < "
| fp_sNextLabel = " > "
| fp_sLastLabel = " >| "
| fp_sDashLabel = " -- "
|
| if not IsEmpty(Request(fp_sFormKey)) then
| fp_sMoveType = Request(fp_sFormKey)
| else
| fp_sMoveType = ""
| end if
|
| fp_iCurrent=1
| fp_fError=False
| fp_bBlankField=False
| Set fp_dictInputs = Server.CreateObject("Scripting.Dictionary")
| Set fp_dictParams = Server.CreateObject("Scripting.Dictionary")
| Set fp_dictColTypes = Server.CreateObject("Scripting.Dictionary")
| fp_iParam = 1
|
| fp_sQry = FP_ReplaceQuoteChars(fp_sQry)
|
| ' replace any input parameters in query string
| ' there need to be at least 5 more characters in the string for there to be
| input parameters (::[_a-z]::)
| Do While (Not fp_fError) And (fp_iCurrent + 5 < Len(fp_sQry) And
| Instr(fp_iCurrent, fp_sQry, "::") > 0)
| fp_iMax = Len(fp_sQry) + 1
| fp_iColonStart = Instr(fp_iCurrent, fp_sQry, "::")
| fp_iSQuoteStart = Instr(fp_iCurrent, fp_sQry, "'")
| fp_iDQuoteStart = Instr(fp_iCurrent, fp_sQry, """")
|
| If (fp_iSQuoteStart = 0) then
| fp_iSQuoteStart = fp_iMax
| End If
| If (fp_iDQuoteStart = 0) then
| fp_iDQuoteStart = fp_iMax
| End If
|
| fp_sQuoteDelim = ""
| fp_iQuoteStart = -1
| fp_iQuoteEnd = fp_iMax
| fp_bQuoteFound = false
| If (fp_iColonStart > fp_iSQuoteStart and fp_iDQuoteStart > fp_iSQuoteStart)
| then 'single quote is first sought for character
| fp_sQuoteDelim = "'"
| fp_iQuoteStart = fp_iSQuoteStart
| elseIf (fp_iColonStart > fp_iDQuoteStart and fp_iSQuoteStart >
| fp_iDQuoteStart) then 'double quote is first sought for character
| fp_sQuoteDelim = """"
| fp_iQuoteStart = fp_iDQuoteStart
| else
| 'The :: comes before any ' or "
| End If
|
| If(fp_sQuoteDelim <> "") then
| fp_iPotQuoteEnd = fp_iQuoteStart + 1
| Do While (fp_bQuoteFound = false and fp_iPotQuoteEnd < fp_iMax)
| fp_iPotQuoteEnd = Instr(fp_iPotQuoteEnd, fp_sQry, fp_sQuoteDelim)
|
| If(fp_iPotQuoteEnd = 0) then
| exit do
| End If
|
| If(fp_iPotQuoteEnd = fp_iMax - 1) then
| fp_iQuoteEnd = fp_iPotQuoteEnd
| fp_bQuoteFound = true
| exit do
| End If
|
| If(Mid(fp_sQry, fp_iPotQuoteEnd + 1, 1) <> fp_sQuoteDelim) then
| fp_iQuoteEnd = fp_iPotQuoteEnd
| fp_bQuoteFound = true
| else
| fp_iPotQuoteEnd = fp_iPotQuoteEnd + 2
| End If
| Loop
|
| If(fp_bQuoteFound = false) then
| Err.Description = "Unable to find a matching quote for " & fp_sQuoteDelim
| & " in the query."
| fp_fError = true
| fp_bSkip = true
| End If
|
| If(fp_iColonStart > fp_iQuoteEnd) then 'there is no user input in this
| literal string
| fp_iCurrent = fp_iQuoteEnd + 1
| fp_bSkip = true
| End If
|
| else
| fp_iQuoteStart = fp_iColonStart
| fp_bQuoteFound = false
| End If
|
| If not fp_bSkip then
| fp_iStart = fp_iColonStart
| ' found a opening ::, find the close ::
| fp_iEnd = InStr(fp_iStart + 2, fp_sQry, "::")
|
| If not fp_bQuoteFound then
| fp_iQuoteEnd = fp_iEnd + 1
| End If
| If fp_iEnd = 0 Then
| fp_fError = True
| Response.Write "<B>Database Results Error: mismatched parameter
| delimiters</B>"
| Else
| fp_sField = Mid(fp_sQry, fp_iStart + 2, fp_iEnd - fp_iStart - 2)
| fp_sValue = Request.Form(fp_sField)
| if len(fp_sValue) = 0 then fp_sValue = Request.QueryString(fp_sField)
|
| ' if the named form field doesn't exist, make a note of it
| If (len(fp_sValue) = 0) Then
| fp_iStartField = InStr(fp_sDefault, fp_sField & "=")
| if fp_iStartField > 0 then
| fp_iStartField = fp_iStartField + len(fp_sField) + 1
| fp_iEndField = InStr(fp_iStartField,fp_sDefault,"&")
| if fp_iEndField > 0 then
| fp_sValue = Mid(fp_sDefault,fp_iStartField,fp_iEndField -
| fp_iStartField)
| else
| fp_sValue = Mid(fp_sDefault,fp_iStartField)
| end if
| end if
| End If
|
| ' remember names and values used in query
| if not fp_dictInputs.Exists(fp_sField) then
| fp_dictInputs.Add fp_sField, fp_sValue
| end if
|
| if (len(fp_sValue) = 0) Then fp_bBlankField = True
|
| fp_iOpEnd = fp_iQuoteStart - 1
|
| Do While (Mid (fp_sQry , fp_iOpEnd , 1) = " ")
| fp_iOpEnd = fp_iOpEnd - 1
| Loop
|
| fp_iFieldEnd = fp_iOpEnd
| If ( Mid(fp_sQry, fp_iOpEnd - 1, 2) = "<=") then
| fp_iFieldEnd = fp_iOpEnd - 2
| ElseIf (Mid(fp_sQry, fp_iOpEnd - 1, 2) = ">=") then
| fp_iFieldEnd = fp_iOpEnd - 2
| ElseIf (Mid(fp_sQry, fp_iOpEnd - 1, 2) = "<>") then
| fp_iFieldEnd = fp_iOpEnd - 2
| ElseIf (UCase(Mid(fp_sQry, fp_iOpEnd - 3, 4)) = "LIKE" ) then
| fp_iFieldEnd = fp_iOpEnd - 4
| ElseIf (Mid(fp_sQry, fp_iOpEnd, 1) = "=") then
| fp_iFieldEnd = fp_iOpEnd - 1
| ElseIf (Mid(fp_sQry, fp_iOpEnd, 1) = "<") then
| fp_iFieldEnd = fp_iOpEnd - 1
| ElseIf (Mid(fp_sQry, fp_iOpEnd, 1) = ">") then
| fp_iFieldEnd = fp_iOpEnd - 1
| End If
|
| If(fp_iFieldEnd <> fp_iOpEnd) Then
| Do While (fp_iFieldEnd) > 0 and (Mid(fp_sQry,fp_iFieldEnd,1) = " ")
| fp_iFieldEnd = fp_iFieldEnd - 1
| Loop
| fp_colNameDelim = ""
|
| If(fp_iFieldEnd) > 0 then
| fp_sTemp = Mid(fp_sQry,fp_iFieldEnd,1)
|
| If(InStr("])""",fp_sTemp)) then
| If(InStr("]",fp_sTemp)) then
| fp_colNameDelim = ".["
| ElseIf (InStr(")",fp_sTemp)) then
| fp_colNameDelim = ".("
| ElseIf (InStr("""",fp_sTemp)) then
| fp_colNameDelim = "."""
| End If
| 'In the End, we ignore the 'quote' character
| fp_iFieldEnd = fp_iFieldEnd - 1
| End If
| End If
|
| fp_iFieldStart = fp_iFieldEnd
| If (fp_colNameDelim = "") then
| fp_colNameDelim = " (."
| End If
|
| DO while (fp_iFieldStart > 0 and InStr(fp_colNameDelim,
| Mid(fp_sQry,fp_iFieldStart,1)) = 0)
| fp_iFieldStart = fp_iFieldStart - 1
| Loop
|
| fp_iFieldStart = fp_iFieldStart + 1
|
| fp_sColName = Mid(fp_sQry, fp_iFieldStart, fp_iFieldEnd - fp_iFieldStart
| + 1)
|
| If( "NOT" = UCase(fp_sColName)) then
| fp_iFieldEnd = fp_iFieldStart - 1
| Do While (fp_iFieldEnd) > 0 and (Mid(fp_sQry,fp_iFieldEnd,1) = " ")
| fp_iFieldEnd = fp_iFieldEnd - 1
| Loop
|
| fp_colNameDelim = ""
|
| If(fp_iFieldEnd) > 0 then
| fp_sTemp = Mid(fp_sQry,fp_iFieldEnd,1)
|
| If(InStr("])""",fp_sTemp)) then
| If(InStr("]",fp_sTemp)) then
| fp_colNameDelim = ".["
| ElseIf (InStr(")",fp_sTemp)) then
| fp_colNameDelim = ".("
| ElseIf (InStr("""",fp_sTemp)) then
| fp_colNameDelim = "."""
| End If
| 'In the End, we ignore the 'quote' character
| fp_iFieldEnd = fp_iFieldEnd - 1
| End If
| End If
|
| fp_iFieldStart = fp_iFieldEnd
| If(fp_colNameDelim = "") Then
| fp_colNameDelim = " (."
| End If
|
| Do while (fp_iFieldStart > 0 and InStr(fp_colNameDelim,
| Mid(fp_sQry,fp_iFieldStart,1)) = 0)
| fp_iFieldStart = fp_iFieldStart - 1
| Loop
| fp_iFieldStart = fp_iFieldStart + 1
|
| fp_sColName = Mid(fp_sQry, fp_iFieldStart, fp_iFieldEnd - fp_iFieldStart
| + 1)
| End If
|
| fp_sColName = Replace(fp_sColName, "[", "")
| fp_sColName = Replace(fp_sColName, "]", "")
|
| fp_colType = ""
| fp_iStartField = InStr(fp_sColTypes, "&" & fp_sColName & "=")
| If fp_iStartField > 0 Then
| fp_iStartField = fp_iStartField + len(fp_sColName) + 2
| fp_iEndField = InStr(fp_iStartField,fp_sColTypes,"&")
| If fp_iEndField > 0 Then
| fp_colType = Mid(fp_sColTypes,fp_iStartField,fp_iEndField -
| fp_iStartField)
| else
| Err.Description = "fp_sColTypes appears to be malformed.<br>"
| Err.Description = Err.Description & "This could happen if your
| DatabaseRegionStart webbot has an empty or missing s-columnnames or
| s-columntypes attributes.<br>"
| Err.Description = Err.Description & "You may need to read Microsoft
| Knowledge Base Article 817029.<br>"
|
| fp_fError = true
| End If
| End If
|
| If(Len(fp_colType) > 0 and IsNumeric(fp_colType)) Then
| fp_dictColTypes.Add fp_iParam, fp_colType
|
| 'Remove single quotes around strings
| select case fp_colType
| case 129, 200, 201, 130, 202, 203 ' adChar, adVarChar, adLongVarChar,
| adWChar, adVarWChar, adLongVarWChar
| If not fp_bQuoteFound and Left(fp_sValue, 1) = "'" or Left(fp_sValue,
| 1) = """" Then
| fp_sValue = Mid(fp_sValue,2,Len(fp_sValue)-2)
| End If
| case else
| ' do nothing
| End select
|
| If fp_sQuoteDelim = """" Then
| fp_sValue = Replace(fp_sValue, """""", """")
| ElseIf fp_sQuoteDelim = "'" Then
| fp_sValue = Replace(fp_sValue, "''", "'")
| End If
|
| If (fp_bQuoteFound) then
| fp_sLead = Mid(fp_sQry, fp_iQuoteStart + 1, fp_iColonStart -
| fp_iQuoteStart -1)
| fp_sTail = Mid(fp_sQry, fp_iEnd + 2, fp_iQuoteEnd - fp_iEnd - 2)
| If fp_sQuoteDelim = """" Then
| fp_sLead = Replace(fp_sLead, """""", """")
| fp_sTail = Replace(fp_sTail, """""", """")
| ElseIf fp_sQuoteDelim = "'" Then
| fp_sLead = Replace(fp_sLead, "''", "'")
| fp_sTail = Replace(fp_sTail, "''", "'")
| End If
|
| fp_sValue = fp_sLead & fp_sValue & fp_sTail
| End If
|
| fp_dictParams.Add fp_iParam, fp_sValue
| fp_iParam = fp_iParam + 1
| fp_sValue = "?"
| else
| ' this next finds the named form field value, and substitutes in
| ' doubled single-quotes for all single quotes in the literal value
| ' so that SQL doesn't get confused by seeing unpaired single-quotes
| Err.Description = "Your page contains a query with user input parameters
| that could not be resolved.<br>"
| Err.Description = Err.Description & "This could happen if your
| DatabaseRegionStart webbot has an empty or missing s-columnnames or
| s-columntypes attributes.<br>"
| Err.Description = Err.Description & "You may need to read Microsoft
| Knowledge Base Article 817029.<br>"
| fp_fError = True
| End If
|
| If((Len(fp_sQry) - fp_iQuoteEnd) < 1) then
| fp_sQry = Left(fp_sQry, fp_iQuoteStart - 1) & "?"
| else
| fp_sQry = Left(fp_sQry, fp_iQuoteStart - 1) & "?" & Right(fp_sQry,
| Len(fp_sQry) - fp_iQuoteEnd)
| End If
| Else
| fp_fError=True
| Err.Description = "Unable to find operator in query string. Query string
| currently is " & fp_sQry
| End If
|
| ' Fixup the new current position to be after the substituted value
| fp_iCurrent = fp_iQuoteStart + 1
| End If
| End If
| fp_bSkip = false
| Loop
|
| ' establish connection
| If Not fp_fError Then
| if Application(fp_sDataConn & "_ConnectionString") = "" then
| if fp_DEBUG Then
| Err.Description = "The database connection named '" & fp_sDataConn & "'
| is undefined.<br><br>"
| Err.Description = Err.Description & "This problem can occur if:<br>"
| Err.Description = Err.Description & "* the connection has been removed
| from the web<br>"
| Err.Description = Err.Description & "* the file 'global.asa' is missing
| or contains errors<br>"
| Err.Description = Err.Description & "* the root folder does not have
| Scripting permissions enabled<br>"
| Err.Description = Err.Description & "* the web is not marked as an
| Application Root<br>"
| else
| Err.Description = "The operation failed. If this continues, please
| contact your server administrator.<br>"
| end if
| fp_fError = True
| end if
| if Not fp_fError then
| set fp_conn = Server.CreateObject("ADODB.Connection")
| fp_conn.ConnectionTimeout = Application(fp_sDataConn & "_ConnectionTimeout")
| fp_conn.CommandTimeout = Application(fp_sDataConn & "_CommandTimeout")
| fp_sConn = Application(fp_sDataConn & "_ConnectionString")
| fp_sUid = Application(fp_sDataConn & "_RuntimeUserName")
| fp_sPwd = Application(fp_sDataConn & "_RuntimePassword")
| Err.Clear
| FP_OpenConnection fp_conn, fp_sConn, fp_sUid, fp_sPwd, Not(fp_fCustomQuery)
| if Err.Description <> "" then fp_fError = True
| end if
| if Not fp_fError then
| set fp_cmd = Server.CreateObject("ADODB.Command")
| fp_cmd.CommandText = fp_sQry
| fp_cmd.CommandType = fp_iCommandType
| set fp_cmd.ActiveConnection = fp_conn
| set fp_rs = Server.CreateObject("ADODB.Recordset")
| set fp_rs.Source = fp_cmd
|
| On Error Resume Next
| fp_iTemp = 1
| Do While fp_iTemp < fp_iParam
| fp_colType = fp_dictColTypes.Item(fp_iTemp)
| fp_colValue = fp_dictParams.Item(fp_iTemp)
|
| select case fp_colType
| case 129, 200, 201, 130, 202, 203 ' adChar, adVarChar, adLongVarChar,
| adWChar, adVarWChar, adLongVarWChar
| fp_cmd.Parameters.Append = fp_cmd.CreateParameter("Field"&fp_iTemp,
| fp_colType, 1, Len(fp_colValue) + 1)
| case else
| fp_cmd.Parameters.Append = fp_cmd.CreateParameter("Field"&fp_iTemp,
| fp_colType, 1 )
| end select
| fp_cmd.Parameters("Field"&fp_iTemp).Value = fp_colValue
| fp_iTemp = fp_iTemp + 1
| LOOP
| On Error Goto 0
|
| If fp_iCommandType = 4 Then
| fp_cmd.Parameters.Refresh
| Do Until Len(fp_sInputs) = 0
| fp_iLoc = InStr(fp_sInputs,"=")
| if fp_iLoc = 0 then exit do
| fp_sKey = Left(fp_sInputs,fp_iLoc - 1)
| fp_sInputs = Mid(fp_sInputs,fp_iLoc + 1)
| fp_iLoc = InStr(fp_sInputs,"&")
| if fp_iLoc = 0 then
| fp_sInpVal = fp_sInputs
| fp_sInputs = ""
| else
| fp_sInpVal = Left(fp_sInputs,fp_iLoc - 1)
| fp_sInputs = Mid(fp_sInputs,fp_iLoc + 1)
| end if
| fp_sVal = Request.Form(fp_sKey)
| if len(fp_sVal) = 0 then fp_sVal = Request.QueryString(fp_sKey)
| if len(fp_sVal) = 0 then fp_sVal = fp_sInpVal
| fp_pType = fp_cmd.Parameters(fp_sKey).Type
| select case fp_pType
| case 129, 200, 201, 130, 202, 203 ' adChar, adVarChar, adLongVarChar,
| adWChar, adVarWChar, adLongVarWChar
| fp_cmd.Parameters(fp_sKey).Size = Len(fp_sVal) + 1
| case else
| ' do nothing
| end select
|
| ' remember names and values used in query
| if not fp_dictInputs.Exists(fp_sKey) then
| fp_dictInputs.Add fp_sKey, fp_sVal
| end if
|
| fp_cmd.Parameters(fp_sKey) = fp_sVal
| Loop
| End If
| If fp_iMaxRecords <> 0 Then fp_rs.MaxRecords = fp_iMaxRecords
|
| FP_SetCursorProperties(fp_rs)
|
| FP_OpenRecordset(fp_rs)
| end if
|
| if(Err.Description = "" ) then
| ' Check for the no-record case
| if fp_rs.State <> 1 then
| fp_fError = True
| Response.Write fp_sNoRecords
| ElseIf fp_rs.EOF And fp_rs.BOF Then
| fp_fError = True
| Response.Write fp_sNoRecords
| end if
| end if
| end if
|
| If Err.Description <> "" Then
| if fp_fTableFormat then
| Response.Write "<tr><td colspan=" & fp_iDisplayCols & " color=#000000
| bgcolor=#ffff00>"
| end if
| Response.Write "<tt>"
| Response.Write "<b>Database Results Error</b><br>"
| if fp_DEBUG Then
| if Not fp_fError Then
| Response.Write "<i>Description:</i> " &
| Server.HtmlEncode(Err.Description) & "<br>"
| Response.Write "<i>Number:</i> " & Server.HtmlEncode(Err.Number) & " (0x"
| & Hex(Err.Number) & ")<br>"
| Response.Write "<i>Source:</i> " & Server.HtmlEncode(Err.Source) & "<br>"
| else
| Response.Write Err.Description
| end if
| if fp_bBlankField Then
| Response.Write "<br>One or more form fields were empty. You should
| provide default values for all form fields that are used in the query."
| end if
| else
| Response.Write "The operation failed. If this continues, please contact
| your server administrator.<br>"
| end if
| Response.Write "</tt>"
| if fp_fTableFormat then
| Response.Write "</td></tr>"
| end if
| fp_fError = True
| end if
|
|
|
| ' determine whether or not provider supports Absolute Positioning
| if not fp_fError then
| if IsObject(fp_rs) and not(fp_rs.Supports(&H00004000)) then
| fp_iPageSize = 0
| fp_fShowNavbar = False
| end if
| end if
|
| ' move to correct position in result set
| if not fp_fError then
|
| if fp_iPageSize > 0 then
| fp_iAbsPage = 1
| fp_sVal = Session(fp_sEnvKey)
| if fp_sVal <> "" then
| fp_iAbsPage = CInt(fp_sVal)
| end if
|
| fp_rs.PageSize = fp_iPageSize
| if fp_iAbsPage > fp_rs.PageCount then fp_iAbsPage = fp_rs.PageCount
| fp_rs.AbsolutePage = fp_iAbsPage
| if fp_rs.PageCount = 1 then fp_fShowNavbar = False
|
| select case fp_sMoveType
| case ""
| ' do nothing
| case fp_sFirstLabel
| fp_rs.AbsolutePage = 1
| case fp_sPrevLabel
| if fp_rs.AbsolutePage > 1 then fp_rs.AbsolutePage = fp_rs.AbsolutePage - 1
| case fp_sNextLabel
| if fp_rs.AbsolutePage < fp_rs.PageCount then fp_rs.AbsolutePage =
| fp_rs.AbsolutePage + 1
| case fp_sLastLabel
| fp_rs.AbsolutePage = fp_rs.PageCount
| case else
| ' do nothing
| end select
|
| fp_iAbsPage = fp_rs.AbsolutePage
| Session(fp_sEnvKey) = fp_iAbsPage
| end if
|
| end if
|
| if fp_fError then fp_fShowNavbar = False
|
| fp_iCount = 0
| Do
| if fp_fError then exit do
| if fp_rs.EOF then exit do
| if fp_iPageSize > 0 And fp_iCount >= fp_rs.PageSize then exit do
| if fp_iMaxRecords > 0 And fp_iCount >= fp_iMaxRecords then
| ' MaxRecords didn't work; exit loop
| fp_fShowNavbar = False
| exit do
| end if
| %>
|
|
|
| "David Berry" wrote:
|
| > Look inside the include page _fpclass/fpdbrgn1.inc and see if there's a
| > LOCID line in there or see what's on line 3. If there is, let us know what
| > it says or comment it out by putting a single quote ' in front of the line.
| >
| > --
| > David Berry
| > FrontPage Support: http://www.frontpagemvps.com/
| >
| >
| >
| > | > > Thanks for the quick repsonse.
| > >
| > > I made the correction to all one line. Different error message still at:
| > >
| > > http://www.bdmcdaytona.com/testcbas/listingsv2.asp
| > >
| > > I don't know if it matters but in the folder list, all the asp pages have
| > > a
| > > samll yellow icon beside the file name, look like a daisy. This one does
| > > not.
| > >
| > > </thead>
| > > <tbody>
| > >
| > > <% 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 Description, Office, Bedroom, Bathrooms, Agent,
| > > Format(Price,'$#,##0.00') as PriceField FROM ""agent3"" ORDER BY Price
| > > DESC"
| > > fp_sDefault=""
| > > fp_sNoRecords="<tr><td colspan=6 align=left width=""100%"">No records
| > > returned.</td></tr>"
| > > fp_sDataConn="Database2"
| > > fp_iMaxRecords=256
| > > fp_iCommandType=1
| > > fp_iPageSize=0
| > > fp_fTableFormat=True
| > > fp_fMenuFormat=False
| > > fp_sMenuChoice="Description"
| > > fp_sMenuValue="Description"
| > > fp_sColTypes="&Description=200&Office=200&Bedrooms=5&Bathrooms=5&Agent=200&Price=6&"
| > > fp_iDisplayCols=6
| > > fp_fCustomQuery=False
| > > BOTID=1
| > > fp_iRegion=BOTID
| > > %>
| > > <!--#include file="_fpclass/fpdbrgn1.inc"-->
| > > <!--webbot bot="DatabaseRegionStart" endspan i-checksum="35829" --><tr>
| > > <td bgcolor="#FFFFFF" width="152" height="40">
| > > <font color="#0B2476">
| > > <!--webbot bot="DatabaseResultColumn"
| > > s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
| > > s-column="Description" b-tableformat="TRUE" b-hashtml="FALSE"
| > > b-makelink="FALSE" clientside b-MenuFormat preview="<font
| > > size="-1"><<</font>Description<font size="-1">>></font>"
| > > startspan --><%=FP_FieldVal(fp_rs,"Description")%><!--webbot
| > > bot="DatabaseResultColumn" endspan i-checksum="30092" --></font></td>
| > > <td bgcolor="#FFFFFF" width="100" height="40">
| > > <font color="#0B2476">
| > > <!--webbot bot="DatabaseResultColumn"
| > > s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
| > > s-column="Office" b-tableformat="TRUE" b-hashtml="FALSE"
| > > b-makelink="FALSE"
| > > clientside b-MenuFormat preview="<font
| > > size="-1"><<</font>Office<font
| > > size="-1">>></font>" startspan
| > > --><%=FP_FieldVal(fp_rs,"Office")%><!--webbot bot="DatabaseResultColumn"
| > > endspan i-checksum="14929" --></font></td>
| > > <td bgcolor="#FFFFFF" width="96" align="center"
| > > height="40">
| > > <font color="#0B2476">
| > > <!--webbot bot="DatabaseResultColumn"
| > > s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
| > > s-column="Bedrooms" b-tableformat="TRUE" b-hashtml="FALSE"
| > > b-makelink="FALSE"
| > > clientside b-MenuFormat preview="<font
| > > size="-1"><<</font>Bedrooms<font
| > > size="-1">>></font>" startspan
| > > --><%=FP_FieldVal(fp_rs,"Bedrooms")%><!--webbot bot="DatabaseResultColumn"
| > > endspan i-checksum="14962" --></font></td>
| > > <td bgcolor="#FFFFFF" width="96" align="center"
| > > height="40">
| > > <font color="#0B2476">
| > > <!--webbot bot="DatabaseResultColumn"
| > > s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
| > > s-column="Bathrooms" b-tableformat="TRUE" b-hashtml="FALSE"
| > > b-makelink="FALSE" clientside b-MenuFormat preview="<font
| > > size="-1"><<</font>Bathrooms<font size="-1">>></font>"
| > > startspan
| > > --><%=FP_FieldVal(fp_rs,"Bathrooms")%><!--webbot
| > > bot="DatabaseResultColumn"
| > > endspan i-checksum="18788" --></font></td>
| > > <td bgcolor="#FFFFFF" width="125" height="40">
| > > <font color="#0B2476">
| > > <!--webbot bot="DatabaseResultColumn"
| > > s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
| > > s-column="Agent" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
| > > clientside b-MenuFormat preview="<font size="-1"><<</font>Agent<font
| > > size="-1">>></font>" startspan
| > > --><%=FP_FieldVal(fp_rs,"Agent")%><!--webbot bot="DatabaseResultColumn"
| > > endspan i-checksum="7350" --></font></td>
| > > <td bgcolor="#FFFFFF" width="129" align="center"
| > > height="40">
| > > <font color="#0B2476">
| > > <%=FP_FieldVal(fp_rs,"PriceField")%></font></td>
| > > </tr>
| > > <!--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="62730" --></tbody>
| > > </table>
| > > </td>
| > > </tr>
| > > </table>
| > > </td>
| > > </tr>
| > > <tr>
| > > <td align="center" height="133" valign="top">
| > > </td>
| > > </tr>
| > > </table>
| > > </td>
| > > </tr>
| > > </table>
| > > </center>
| > > </div>
| > >
| > > </body>
| > >
| > > </html>
| > >
| > >
| > >
| > > "David Berry" wrote:
| > >
| > >> The example I just posted may have word wrapped but the SELECT should all
| > >> be
| > >> a single line (not two lines)
| > >>
| > >> --
| > >> David Berry
| > >> FrontPage Support: http://www.frontpagemvps.com/
| > >>
| > >>
| > >>
| > >> | > >> > Thanks for the effort on this but no joy so far......
| > >> >
| > >> > this is the modified code: ( removed the gray code so it would stick)
| > >> >
| > >> > <% 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 Description, Office, Bedroom, Bathrooms, Agent,
| > >> > Format(Price,'$#,##0.00') as PriceField FROM ""agent3"" ORDER BY Price
| > >> > DESC"
| > >> > fp_sDefault=""
| > >> > fp_sNoRecords="<tr><td colspan=6 align=left width=""100%"">No records
| > >> > returned.</td></tr>"
| > >> > fp_sDataConn="Database2"
| > >> > fp_iMaxRecords=256
| > >> > fp_iCommandType=1
| > >> > fp_iPageSize=0
| > >> > fp_fTableFormat=True
| > >> > fp_fMenuFormat=False
| > >> > fp_sMenuChoice="Description"
| > >> > fp_sMenuValue="Description"
| > >> > fp_sColTypes="&Description=200&Office=200&Bedrooms=5&Bathrooms=5&Agent=200&Price=6&"
| > >> > fp_iDisplayCols=6
| > >> > fp_fCustomQuery=False
| > >> > BOTID=1
| > >> > fp_iRegion=BOTID
| > >> > %>
| > >> > <!--#include file="_fpclass/fpdbrgn1.inc"-->
| > >> > <!--webbot bot="DatabaseRegionStart" endspan i-checksum="35829" --><tr>
| > >> > <td bgcolor="#FFFFFF" width="152" height="40">
| > >> > <font color="#0B2476">
| > >> > <!--webbot bot="DatabaseResultColumn"
| > >> > s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
| > >> > s-column="Description" b-tableformat="TRUE" b-hashtml="FALSE"
| > >> > b-makelink="FALSE" clientside b-MenuFormat preview="<font
| > >> > size="-1"><<</font>Description<font size="-1">>></font>"
| > >> > startspan --><%=FP_FieldVal(fp_rs,"Description")%><!--webbot
| > >> > bot="DatabaseResultColumn" endspan i-checksum="30092" --></font></td>
| > >> > <td bgcolor="#FFFFFF" width="100" height="40">
| > >> > <font color="#0B2476">
| > >> > <!--webbot bot="DatabaseResultColumn"
| > >> > s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
| > >> > s-column="Office" b-tableformat="TRUE" b-hashtml="FALSE"
| > >> > b-makelink="FALSE"
| > >> > clientside b-MenuFormat preview="<font
| > >> > size="-1"><<</font>Office<font
| > >> > size="-1">>></font>" startspan
| > >> > --><%=FP_FieldVal(fp_rs,"Office")%><!--webbot
| > >> > bot="DatabaseResultColumn"
| > >> > endspan i-checksum="14929" --></font></td>
| > >> > <td bgcolor="#FFFFFF" width="96" align="center"
| > >> > height="40">
| > >> > <font color="#0B2476">
| > >> > <!--webbot bot="DatabaseResultColumn"
| > >> > s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
| > >> > s-column="Bedrooms" b-tableformat="TRUE" b-hashtml="FALSE"
| > >> > b-makelink="FALSE"
| > >> > clientside b-MenuFormat preview="<font
| > >> > size="-1"><<</font>Bedrooms<font
| > >> > size="-1">>></font>" startspan
| > >> > --><%=FP_FieldVal(fp_rs,"Bedrooms")%><!--webbot
| > >> > bot="DatabaseResultColumn"
| > >> > endspan i-checksum="14962" --></font></td>
| > >> > <td bgcolor="#FFFFFF" width="96" align="center"
| > >> > height="40">
| > >> > <font color="#0B2476">
| > >> > <!--webbot bot="DatabaseResultColumn"
| > >> > s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
| > >> > s-column="Bathrooms" b-tableformat="TRUE" b-hashtml="FALSE"
| > >> > b-makelink="FALSE" clientside b-MenuFormat preview="<font
| > >> > size="-1"><<</font>Bathrooms<font size="-1">>></font>"
| > >> > startspan
| > >> > --><%=FP_FieldVal(fp_rs,"Bathrooms")%><!--webbot
| > >> > bot="DatabaseResultColumn"
| > >> > endspan i-checksum="18788" --></font></td>
| > >> > <td bgcolor="#FFFFFF" width="125" height="40">
| > >> > <font color="#0B2476">
| > >> > <!--webbot bot="DatabaseResultColumn"
| > >> > s-columnnames="Description,Office,Bedrooms,Bathrooms,Agent,Price"
| > >> > s-column="Agent" b-tableformat="TRUE" b-hashtml="FALSE"
| > >> > b-makelink="FALSE"
| > >> > clientside b-MenuFormat preview="<font size="-1"><<</font>Agent<font
| > >> > size="-1">>></font>" startspan
| > >> > --><%=FP_FieldVal(fp_rs,"Agent")%><!--webbot bot="DatabaseResultColumn"
| > >> > endspan i-checksum="7350" --></font></td>
| > >> > <td bgcolor="#FFFFFF" width="129" align="center"
| > >> > height="40">
| > >> > <font color="#0B2476">
| > >> > <%=FP_FieldVal(fp_rs,"PriceField")%></font></td>
| > >> > </tr>
| > >> > <!--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="62730" --></tbody>
| > >> > </table>
| > >> > </td>
| > >> > </tr>
| > >> > </table>
| > >> > </td>
| > >> > </tr>
| > >> > <tr>
| > >> > <td align="center" height="133" valign="top">
| > >> > </td>
| > >> > </tr>
| > >> > </table>
| > >> > </td>
| > >> > </tr>
| > >> > </table>
| > >> > </center>
| > >> > </div>
| > >> >
| > >> > </body>
| > >> >
| > >> > </html>
| > >> >
| > >> > And this is the error I got..
| > >> >
| > >> > http://www.bdmcdaytona.com/testcbas/listingsv2.asp
| > >> >
| > >> > In the Page View of FP <<Price>> is missing from the Price column
| > >> >
| > >> > "David Berry" wrote:
| > >> >
 
Thank you. I'm actually experimeting on listingsv2.asp but this code is in
the head

<head>
<% ' FP_ASP -- ASP Automatically generated by a Frontpage Component. Do not
Edit.
FP_LCID = 1033 %>
<meta http-equiv="Content-Language" content="en-us">
<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>Coldwell Banker All Stars Listings</title>
</head>


Stefan B Rusynko said:
Make sure in http://www.bdmcdaytona.com/testcbas/listings.asp you have in the Head section

<%
' FP_ASP -- ASP Automatically generated by a Frontpage Component. Do not Edit.
FP_LCID=1033
%>

FP_LCID=1033
must be on a line by itself
--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


| OK, I searched the text and did not find LOCID. When I opened this file, the
| third line already had a single quote,
|
| Here is the text of the file:
|
| <%
|
| FP_SetLocaleForPage
|
| ' determine whether or not to provide navigation controls
| if fp_iPageSize > 0 then
| fp_fShowNavbar = True
| else
| fp_fShowNavbar = False
| end if
|
| fp_sPagePath = Request.ServerVariables("PATH_INFO")
| fp_sEnvKey = fp_sPagePath & "#fpdbr_" & fp_iRegion
| fp_sFormName = "fpdbr_" & CStr(fp_iRegion)
| fp_sFormKey = fp_sFormName & "_PagingMove"
|
| fp_sInputs = fp_sDefault
|
| fp_DEBUG = False
|
| fp_sFirstLabel = " |< "
| fp_sPrevLabel = " < "
| fp_sNextLabel = " > "
| fp_sLastLabel = " >| "
| fp_sDashLabel = " -- "
|
| if not IsEmpty(Request(fp_sFormKey)) then
| fp_sMoveType = Request(fp_sFormKey)
| else
| fp_sMoveType = ""
| end if
|
| fp_iCurrent=1
| fp_fError=False
| fp_bBlankField=False
| Set fp_dictInputs = Server.CreateObject("Scripting.Dictionary")
| Set fp_dictParams = Server.CreateObject("Scripting.Dictionary")
| Set fp_dictColTypes = Server.CreateObject("Scripting.Dictionary")
| fp_iParam = 1
|
| fp_sQry = FP_ReplaceQuoteChars(fp_sQry)
|
| ' replace any input parameters in query string
| ' there need to be at least 5 more characters in the string for there to be
| input parameters (::[_a-z]::)
| Do While (Not fp_fError) And (fp_iCurrent + 5 < Len(fp_sQry) And
| Instr(fp_iCurrent, fp_sQry, "::") > 0)
| fp_iMax = Len(fp_sQry) + 1
| fp_iColonStart = Instr(fp_iCurrent, fp_sQry, "::")
| fp_iSQuoteStart = Instr(fp_iCurrent, fp_sQry, "'")
| fp_iDQuoteStart = Instr(fp_iCurrent, fp_sQry, """")
|
| If (fp_iSQuoteStart = 0) then
| fp_iSQuoteStart = fp_iMax
| End If
| If (fp_iDQuoteStart = 0) then
| fp_iDQuoteStart = fp_iMax
| End If
|
| fp_sQuoteDelim = ""
| fp_iQuoteStart = -1
| fp_iQuoteEnd = fp_iMax
| fp_bQuoteFound = false
| If (fp_iColonStart > fp_iSQuoteStart and fp_iDQuoteStart > fp_iSQuoteStart)
| then 'single quote is first sought for character
| fp_sQuoteDelim = "'"
| fp_iQuoteStart = fp_iSQuoteStart
| elseIf (fp_iColonStart > fp_iDQuoteStart and fp_iSQuoteStart >
| fp_iDQuoteStart) then 'double quote is first sought for character
| fp_sQuoteDelim = """"
| fp_iQuoteStart = fp_iDQuoteStart
| else
| 'The :: comes before any ' or "
| End If
|
| If(fp_sQuoteDelim <> "") then
| fp_iPotQuoteEnd = fp_iQuoteStart + 1
| Do While (fp_bQuoteFound = false and fp_iPotQuoteEnd < fp_iMax)
| fp_iPotQuoteEnd = Instr(fp_iPotQuoteEnd, fp_sQry, fp_sQuoteDelim)
|
| If(fp_iPotQuoteEnd = 0) then
| exit do
| End If
|
| If(fp_iPotQuoteEnd = fp_iMax - 1) then
| fp_iQuoteEnd = fp_iPotQuoteEnd
| fp_bQuoteFound = true
| exit do
| End If
|
| If(Mid(fp_sQry, fp_iPotQuoteEnd + 1, 1) <> fp_sQuoteDelim) then
| fp_iQuoteEnd = fp_iPotQuoteEnd
| fp_bQuoteFound = true
| else
| fp_iPotQuoteEnd = fp_iPotQuoteEnd + 2
| End If
| Loop
|
| If(fp_bQuoteFound = false) then
| Err.Description = "Unable to find a matching quote for " & fp_sQuoteDelim
| & " in the query."
| fp_fError = true
| fp_bSkip = true
| End If
|
| If(fp_iColonStart > fp_iQuoteEnd) then 'there is no user input in this
| literal string
| fp_iCurrent = fp_iQuoteEnd + 1
| fp_bSkip = true
| End If
|
| else
| fp_iQuoteStart = fp_iColonStart
| fp_bQuoteFound = false
| End If
|
| If not fp_bSkip then
| fp_iStart = fp_iColonStart
| ' found a opening ::, find the close ::
| fp_iEnd = InStr(fp_iStart + 2, fp_sQry, "::")
|
| If not fp_bQuoteFound then
| fp_iQuoteEnd = fp_iEnd + 1
| End If
| If fp_iEnd = 0 Then
| fp_fError = True
| Response.Write "<B>Database Results Error: mismatched parameter
| delimiters</B>"
| Else
| fp_sField = Mid(fp_sQry, fp_iStart + 2, fp_iEnd - fp_iStart - 2)
| fp_sValue = Request.Form(fp_sField)
| if len(fp_sValue) = 0 then fp_sValue = Request.QueryString(fp_sField)
|
| ' if the named form field doesn't exist, make a note of it
| If (len(fp_sValue) = 0) Then
| fp_iStartField = InStr(fp_sDefault, fp_sField & "=")
| if fp_iStartField > 0 then
| fp_iStartField = fp_iStartField + len(fp_sField) + 1
| fp_iEndField = InStr(fp_iStartField,fp_sDefault,"&")
| if fp_iEndField > 0 then
| fp_sValue = Mid(fp_sDefault,fp_iStartField,fp_iEndField -
| fp_iStartField)
| else
| fp_sValue = Mid(fp_sDefault,fp_iStartField)
| end if
| end if
| End If
|
| ' remember names and values used in query
| if not fp_dictInputs.Exists(fp_sField) then
| fp_dictInputs.Add fp_sField, fp_sValue
| end if
|
| if (len(fp_sValue) = 0) Then fp_bBlankField = True
|
| fp_iOpEnd = fp_iQuoteStart - 1
|
| Do While (Mid (fp_sQry , fp_iOpEnd , 1) = " ")
| fp_iOpEnd = fp_iOpEnd - 1
| Loop
|
| fp_iFieldEnd = fp_iOpEnd
| If ( Mid(fp_sQry, fp_iOpEnd - 1, 2) = "<=") then
| fp_iFieldEnd = fp_iOpEnd - 2
| ElseIf (Mid(fp_sQry, fp_iOpEnd - 1, 2) = ">=") then
| fp_iFieldEnd = fp_iOpEnd - 2
| ElseIf (Mid(fp_sQry, fp_iOpEnd - 1, 2) = "<>") then
| fp_iFieldEnd = fp_iOpEnd - 2
| ElseIf (UCase(Mid(fp_sQry, fp_iOpEnd - 3, 4)) = "LIKE" ) then
| fp_iFieldEnd = fp_iOpEnd - 4
| ElseIf (Mid(fp_sQry, fp_iOpEnd, 1) = "=") then
| fp_iFieldEnd = fp_iOpEnd - 1
| ElseIf (Mid(fp_sQry, fp_iOpEnd, 1) = "<") then
| fp_iFieldEnd = fp_iOpEnd - 1
| ElseIf (Mid(fp_sQry, fp_iOpEnd, 1) = ">") then
| fp_iFieldEnd = fp_iOpEnd - 1
| End If
|
| If(fp_iFieldEnd <> fp_iOpEnd) Then
| Do While (fp_iFieldEnd) > 0 and (Mid(fp_sQry,fp_iFieldEnd,1) = " ")
| fp_iFieldEnd = fp_iFieldEnd - 1
| Loop
| fp_colNameDelim = ""
|
| If(fp_iFieldEnd) > 0 then
| fp_sTemp = Mid(fp_sQry,fp_iFieldEnd,1)
|
| If(InStr("])""",fp_sTemp)) then
| If(InStr("]",fp_sTemp)) then
| fp_colNameDelim = ".["
| ElseIf (InStr(")",fp_sTemp)) then
| fp_colNameDelim = ".("
| ElseIf (InStr("""",fp_sTemp)) then
| fp_colNameDelim = "."""
| End If
| 'In the End, we ignore the 'quote' character
| fp_iFieldEnd = fp_iFieldEnd - 1
| End If
| End If
|
| fp_iFieldStart = fp_iFieldEnd
| If (fp_colNameDelim = "") then
| fp_colNameDelim = " (."
| End If
|
| DO while (fp_iFieldStart > 0 and InStr(fp_colNameDelim,
| Mid(fp_sQry,fp_iFieldStart,1)) = 0)
| fp_iFieldStart = fp_iFieldStart - 1
| Loop
|
| fp_iFieldStart = fp_iFieldStart + 1
|
| fp_sColName = Mid(fp_sQry, fp_iFieldStart, fp_iFieldEnd - fp_iFieldStart
| + 1)
|
| If( "NOT" = UCase(fp_sColName)) then
| fp_iFieldEnd = fp_iFieldStart - 1
| Do While (fp_iFieldEnd) > 0 and (Mid(fp_sQry,fp_iFieldEnd,1) = " ")
| fp_iFieldEnd = fp_iFieldEnd - 1
| Loop
|
| fp_colNameDelim = ""
|
| If(fp_iFieldEnd) > 0 then
| fp_sTemp = Mid(fp_sQry,fp_iFieldEnd,1)
|
| If(InStr("])""",fp_sTemp)) then
| If(InStr("]",fp_sTemp)) then
| fp_colNameDelim = ".["
| ElseIf (InStr(")",fp_sTemp)) then
| fp_colNameDelim = ".("
| ElseIf (InStr("""",fp_sTemp)) then
| fp_colNameDelim = "."""
| End If
| 'In the End, we ignore the 'quote' character
| fp_iFieldEnd = fp_iFieldEnd - 1
| End If
| End If
|
| fp_iFieldStart = fp_iFieldEnd
| If(fp_colNameDelim = "") Then
| fp_colNameDelim = " (."
| End If
|
| Do while (fp_iFieldStart > 0 and InStr(fp_colNameDelim,
| Mid(fp_sQry,fp_iFieldStart,1)) = 0)
| fp_iFieldStart = fp_iFieldStart - 1
| Loop
| fp_iFieldStart = fp_iFieldStart + 1
|
| fp_sColName = Mid(fp_sQry, fp_iFieldStart, fp_iFieldEnd - fp_iFieldStart
| + 1)
| End If
|
| fp_sColName = Replace(fp_sColName, "[", "")
| fp_sColName = Replace(fp_sColName, "]", "")
|
| fp_colType = ""
| fp_iStartField = InStr(fp_sColTypes, "&" & fp_sColName & "=")
| If fp_iStartField > 0 Then
| fp_iStartField = fp_iStartField + len(fp_sColName) + 2
| fp_iEndField = InStr(fp_iStartField,fp_sColTypes,"&")
| If fp_iEndField > 0 Then
| fp_colType = Mid(fp_sColTypes,fp_iStartField,fp_iEndField -
| fp_iStartField)
| else
| Err.Description = "fp_sColTypes appears to be malformed.<br>"
| Err.Description = Err.Description & "This could happen if your
| DatabaseRegionStart webbot has an empty or missing s-columnnames or
| s-columntypes attributes.<br>"
| Err.Description = Err.Description & "You may need to read Microsoft
| Knowledge Base Article 817029.<br>"
|
| fp_fError = true
| End If
| End If
|
 
So did that solve the problem?

--
David Berry
FrontPage Support: http://www.frontpagemvps.com/



Daytona Steve said:
Thank you. I'm actually experimeting on listingsv2.asp but this code is
in
the head

<head>
<% ' FP_ASP -- ASP Automatically generated by a Frontpage Component. Do
not
Edit.
FP_LCID = 1033 %>
<meta http-equiv="Content-Language" content="en-us">
<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>Coldwell Banker All Stars Listings</title>
</head>


Stefan B Rusynko said:
Make sure in http://www.bdmcdaytona.com/testcbas/listings.asp you have in
the Head section

<%
' FP_ASP -- ASP Automatically generated by a Frontpage Component. Do not
Edit.
FP_LCID=1033
%>

FP_LCID=1033
must be on a line by itself
--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


| OK, I searched the text and did not find LOCID. When I opened this
file, the
| third line already had a single quote,
|
| Here is the text of the file:
|
| <%
|
| FP_SetLocaleForPage
|
| ' determine whether or not to provide navigation controls
| if fp_iPageSize > 0 then
| fp_fShowNavbar = True
| else
| fp_fShowNavbar = False
| end if
|
| fp_sPagePath = Request.ServerVariables("PATH_INFO")
| fp_sEnvKey = fp_sPagePath & "#fpdbr_" & fp_iRegion
| fp_sFormName = "fpdbr_" & CStr(fp_iRegion)
| fp_sFormKey = fp_sFormName & "_PagingMove"
|
| fp_sInputs = fp_sDefault
|
| fp_DEBUG = False
|
| fp_sFirstLabel = " |< "
| fp_sPrevLabel = " < "
| fp_sNextLabel = " > "
| fp_sLastLabel = " >| "
| fp_sDashLabel = " -- "
|
| if not IsEmpty(Request(fp_sFormKey)) then
| fp_sMoveType = Request(fp_sFormKey)
| else
| fp_sMoveType = ""
| end if
|
| fp_iCurrent=1
| fp_fError=False
| fp_bBlankField=False
| Set fp_dictInputs = Server.CreateObject("Scripting.Dictionary")
| Set fp_dictParams = Server.CreateObject("Scripting.Dictionary")
| Set fp_dictColTypes = Server.CreateObject("Scripting.Dictionary")
| fp_iParam = 1
|
| fp_sQry = FP_ReplaceQuoteChars(fp_sQry)
|
| ' replace any input parameters in query string
| ' there need to be at least 5 more characters in the string for there
to be
| input parameters (::[_a-z]::)
| Do While (Not fp_fError) And (fp_iCurrent + 5 < Len(fp_sQry) And
| Instr(fp_iCurrent, fp_sQry, "::") > 0)
| fp_iMax = Len(fp_sQry) + 1
| fp_iColonStart = Instr(fp_iCurrent, fp_sQry, "::")
| fp_iSQuoteStart = Instr(fp_iCurrent, fp_sQry, "'")
| fp_iDQuoteStart = Instr(fp_iCurrent, fp_sQry, """")
|
| If (fp_iSQuoteStart = 0) then
| fp_iSQuoteStart = fp_iMax
| End If
| If (fp_iDQuoteStart = 0) then
| fp_iDQuoteStart = fp_iMax
| End If
|
| fp_sQuoteDelim = ""
| fp_iQuoteStart = -1
| fp_iQuoteEnd = fp_iMax
| fp_bQuoteFound = false
| If (fp_iColonStart > fp_iSQuoteStart and fp_iDQuoteStart >
fp_iSQuoteStart)
| then 'single quote is first sought for character
| fp_sQuoteDelim = "'"
| fp_iQuoteStart = fp_iSQuoteStart
| elseIf (fp_iColonStart > fp_iDQuoteStart and fp_iSQuoteStart >
| fp_iDQuoteStart) then 'double quote is first sought for character
| fp_sQuoteDelim = """"
| fp_iQuoteStart = fp_iDQuoteStart
| else
| 'The :: comes before any ' or "
| End If
|
| If(fp_sQuoteDelim <> "") then
| fp_iPotQuoteEnd = fp_iQuoteStart + 1
| Do While (fp_bQuoteFound = false and fp_iPotQuoteEnd < fp_iMax)
| fp_iPotQuoteEnd = Instr(fp_iPotQuoteEnd, fp_sQry, fp_sQuoteDelim)
|
| If(fp_iPotQuoteEnd = 0) then
| exit do
| End If
|
| If(fp_iPotQuoteEnd = fp_iMax - 1) then
| fp_iQuoteEnd = fp_iPotQuoteEnd
| fp_bQuoteFound = true
| exit do
| End If
|
| If(Mid(fp_sQry, fp_iPotQuoteEnd + 1, 1) <> fp_sQuoteDelim) then
| fp_iQuoteEnd = fp_iPotQuoteEnd
| fp_bQuoteFound = true
| else
| fp_iPotQuoteEnd = fp_iPotQuoteEnd + 2
| End If
| Loop
|
| If(fp_bQuoteFound = false) then
| Err.Description = "Unable to find a matching quote for " &
fp_sQuoteDelim
| & " in the query."
| fp_fError = true
| fp_bSkip = true
| End If
|
| If(fp_iColonStart > fp_iQuoteEnd) then 'there is no user input in this
| literal string
| fp_iCurrent = fp_iQuoteEnd + 1
| fp_bSkip = true
| End If
|
| else
| fp_iQuoteStart = fp_iColonStart
| fp_bQuoteFound = false
| End If
|
| If not fp_bSkip then
| fp_iStart = fp_iColonStart
| ' found a opening ::, find the close ::
| fp_iEnd = InStr(fp_iStart + 2, fp_sQry, "::")
|
| If not fp_bQuoteFound then
| fp_iQuoteEnd = fp_iEnd + 1
| End If
| If fp_iEnd = 0 Then
| fp_fError = True
| Response.Write "<B>Database Results Error: mismatched parameter
| delimiters</B>"
| Else
| fp_sField = Mid(fp_sQry, fp_iStart + 2, fp_iEnd - fp_iStart - 2)
| fp_sValue = Request.Form(fp_sField)
| if len(fp_sValue) = 0 then fp_sValue = Request.QueryString(fp_sField)
|
| ' if the named form field doesn't exist, make a note of it
| If (len(fp_sValue) = 0) Then
| fp_iStartField = InStr(fp_sDefault, fp_sField & "=")
| if fp_iStartField > 0 then
| fp_iStartField = fp_iStartField + len(fp_sField) + 1
| fp_iEndField = InStr(fp_iStartField,fp_sDefault,"&")
| if fp_iEndField > 0 then
| fp_sValue = Mid(fp_sDefault,fp_iStartField,fp_iEndField -
| fp_iStartField)
| else
| fp_sValue = Mid(fp_sDefault,fp_iStartField)
| end if
| end if
| End If
|
| ' remember names and values used in query
| if not fp_dictInputs.Exists(fp_sField) then
| fp_dictInputs.Add fp_sField, fp_sValue
| end if
|
| if (len(fp_sValue) = 0) Then fp_bBlankField = True
|
| fp_iOpEnd = fp_iQuoteStart - 1
|
| Do While (Mid (fp_sQry , fp_iOpEnd , 1) = " ")
| fp_iOpEnd = fp_iOpEnd - 1
| Loop
|
| fp_iFieldEnd = fp_iOpEnd
| If ( Mid(fp_sQry, fp_iOpEnd - 1, 2) = "<=") then
| fp_iFieldEnd = fp_iOpEnd - 2
| ElseIf (Mid(fp_sQry, fp_iOpEnd - 1, 2) = ">=") then
| fp_iFieldEnd = fp_iOpEnd - 2
| ElseIf (Mid(fp_sQry, fp_iOpEnd - 1, 2) = "<>") then
| fp_iFieldEnd = fp_iOpEnd - 2
| ElseIf (UCase(Mid(fp_sQry, fp_iOpEnd - 3, 4)) = "LIKE" ) then
| fp_iFieldEnd = fp_iOpEnd - 4
| ElseIf (Mid(fp_sQry, fp_iOpEnd, 1) = "=") then
| fp_iFieldEnd = fp_iOpEnd - 1
| ElseIf (Mid(fp_sQry, fp_iOpEnd, 1) = "<") then
| fp_iFieldEnd = fp_iOpEnd - 1
| ElseIf (Mid(fp_sQry, fp_iOpEnd, 1) = ">") then
| fp_iFieldEnd = fp_iOpEnd - 1
| End If
|
| If(fp_iFieldEnd <> fp_iOpEnd) Then
| Do While (fp_iFieldEnd) > 0 and (Mid(fp_sQry,fp_iFieldEnd,1) = " ")
| fp_iFieldEnd = fp_iFieldEnd - 1
| Loop
| fp_colNameDelim = ""
|
| If(fp_iFieldEnd) > 0 then
| fp_sTemp = Mid(fp_sQry,fp_iFieldEnd,1)
|
| If(InStr("])""",fp_sTemp)) then
| If(InStr("]",fp_sTemp)) then
| fp_colNameDelim = ".["
| ElseIf (InStr(")",fp_sTemp)) then
| fp_colNameDelim = ".("
| ElseIf (InStr("""",fp_sTemp)) then
| fp_colNameDelim = "."""
| End If
| 'In the End, we ignore the 'quote' character
| fp_iFieldEnd = fp_iFieldEnd - 1
| End If
| End If
|
| fp_iFieldStart = fp_iFieldEnd
| If (fp_colNameDelim = "") then
| fp_colNameDelim = " (."
| End If
|
| DO while (fp_iFieldStart > 0 and InStr(fp_colNameDelim,
| Mid(fp_sQry,fp_iFieldStart,1)) = 0)
| fp_iFieldStart = fp_iFieldStart - 1
| Loop
|
| fp_iFieldStart = fp_iFieldStart + 1
|
| fp_sColName = Mid(fp_sQry, fp_iFieldStart, fp_iFieldEnd -
fp_iFieldStart
| + 1)
|
| If( "NOT" = UCase(fp_sColName)) then
| fp_iFieldEnd = fp_iFieldStart - 1
| Do While (fp_iFieldEnd) > 0 and (Mid(fp_sQry,fp_iFieldEnd,1) = " ")
| fp_iFieldEnd = fp_iFieldEnd - 1
| Loop
|
| fp_colNameDelim = ""
|
| If(fp_iFieldEnd) > 0 then
| fp_sTemp = Mid(fp_sQry,fp_iFieldEnd,1)
|
| If(InStr("])""",fp_sTemp)) then
| If(InStr("]",fp_sTemp)) then
| fp_colNameDelim = ".["
| ElseIf (InStr(")",fp_sTemp)) then
| fp_colNameDelim = ".("
| ElseIf (InStr("""",fp_sTemp)) then
| fp_colNameDelim = "."""
| End If
| 'In the End, we ignore the 'quote' character
| fp_iFieldEnd = fp_iFieldEnd - 1
| End If
| End If
|
| fp_iFieldStart = fp_iFieldEnd
| If(fp_colNameDelim = "") Then
| fp_colNameDelim = " (."
| End If
|
| Do while (fp_iFieldStart > 0 and InStr(fp_colNameDelim,
| Mid(fp_sQry,fp_iFieldStart,1)) = 0)
| fp_iFieldStart = fp_iFieldStart - 1
| Loop
| fp_iFieldStart = fp_iFieldStart + 1
|
| fp_sColName = Mid(fp_sQry, fp_iFieldStart, fp_iFieldEnd -
fp_iFieldStart
| + 1)
| End If
|
| fp_sColName = Replace(fp_sColName, "[", "")
| fp_sColName = Replace(fp_sColName, "]", "")
|
| fp_colType = ""
| fp_iStartField = InStr(fp_sColTypes, "&" & fp_sColName & "=")
| If fp_iStartField > 0 Then
| fp_iStartField = fp_iStartField + len(fp_sColName) + 2
| fp_iEndField = InStr(fp_iStartField,fp_sColTypes,"&")
| If fp_iEndField > 0 Then
| fp_colType = Mid(fp_sColTypes,fp_iStartField,fp_iEndField -
| fp_iStartField)
| else
| Err.Description = "fp_sColTypes appears to be malformed.<br>"
| Err.Description = Err.Description & "This could happen if your
| DatabaseRegionStart webbot has an empty or missing s-columnnames or
| s-columntypes attributes.<br>"
| Err.Description = Err.Description & "You may need to read Microsoft
| Knowledge Base Article 817029.<br>"
|
| fp_fError = true
| End If
| End If
|
 
I'm sorry to report it did not. Perhaps I should switch to Access? (great,
a new software that I don't know how to use).

David Berry said:
So did that solve the problem?

--
David Berry
FrontPage Support: http://www.frontpagemvps.com/



Daytona Steve said:
Thank you. I'm actually experimeting on listingsv2.asp but this code is
in
the head

<head>
<% ' FP_ASP -- ASP Automatically generated by a Frontpage Component. Do
not
Edit.
FP_LCID = 1033 %>
<meta http-equiv="Content-Language" content="en-us">
<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>Coldwell Banker All Stars Listings</title>
</head>


Stefan B Rusynko said:
Make sure in http://www.bdmcdaytona.com/testcbas/listings.asp you have in
the Head section

<%
' FP_ASP -- ASP Automatically generated by a Frontpage Component. Do not
Edit.
FP_LCID=1033
%>

FP_LCID=1033
must be on a line by itself
--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


| OK, I searched the text and did not find LOCID. When I opened this
file, the
| third line already had a single quote,
|
| Here is the text of the file:
|
| <%
|
| FP_SetLocaleForPage
|
| ' determine whether or not to provide navigation controls
| if fp_iPageSize > 0 then
| fp_fShowNavbar = True
| else
| fp_fShowNavbar = False
| end if
|
| fp_sPagePath = Request.ServerVariables("PATH_INFO")
| fp_sEnvKey = fp_sPagePath & "#fpdbr_" & fp_iRegion
| fp_sFormName = "fpdbr_" & CStr(fp_iRegion)
| fp_sFormKey = fp_sFormName & "_PagingMove"
|
| fp_sInputs = fp_sDefault
|
| fp_DEBUG = False
|
| fp_sFirstLabel = " |< "
| fp_sPrevLabel = " < "
| fp_sNextLabel = " > "
| fp_sLastLabel = " >| "
| fp_sDashLabel = " -- "
|
| if not IsEmpty(Request(fp_sFormKey)) then
| fp_sMoveType = Request(fp_sFormKey)
| else
| fp_sMoveType = ""
| end if
|
| fp_iCurrent=1
| fp_fError=False
| fp_bBlankField=False
| Set fp_dictInputs = Server.CreateObject("Scripting.Dictionary")
| Set fp_dictParams = Server.CreateObject("Scripting.Dictionary")
| Set fp_dictColTypes = Server.CreateObject("Scripting.Dictionary")
| fp_iParam = 1
|
| fp_sQry = FP_ReplaceQuoteChars(fp_sQry)
|
| ' replace any input parameters in query string
| ' there need to be at least 5 more characters in the string for there
to be
| input parameters (::[_a-z]::)
| Do While (Not fp_fError) And (fp_iCurrent + 5 < Len(fp_sQry) And
| Instr(fp_iCurrent, fp_sQry, "::") > 0)
| fp_iMax = Len(fp_sQry) + 1
| fp_iColonStart = Instr(fp_iCurrent, fp_sQry, "::")
| fp_iSQuoteStart = Instr(fp_iCurrent, fp_sQry, "'")
| fp_iDQuoteStart = Instr(fp_iCurrent, fp_sQry, """")
|
| If (fp_iSQuoteStart = 0) then
| fp_iSQuoteStart = fp_iMax
| End If
| If (fp_iDQuoteStart = 0) then
| fp_iDQuoteStart = fp_iMax
| End If
|
| fp_sQuoteDelim = ""
| fp_iQuoteStart = -1
| fp_iQuoteEnd = fp_iMax
| fp_bQuoteFound = false
| If (fp_iColonStart > fp_iSQuoteStart and fp_iDQuoteStart >
fp_iSQuoteStart)
| then 'single quote is first sought for character
| fp_sQuoteDelim = "'"
| fp_iQuoteStart = fp_iSQuoteStart
| elseIf (fp_iColonStart > fp_iDQuoteStart and fp_iSQuoteStart >
| fp_iDQuoteStart) then 'double quote is first sought for character
| fp_sQuoteDelim = """"
| fp_iQuoteStart = fp_iDQuoteStart
| else
| 'The :: comes before any ' or "
| End If
|
| If(fp_sQuoteDelim <> "") then
| fp_iPotQuoteEnd = fp_iQuoteStart + 1
| Do While (fp_bQuoteFound = false and fp_iPotQuoteEnd < fp_iMax)
| fp_iPotQuoteEnd = Instr(fp_iPotQuoteEnd, fp_sQry, fp_sQuoteDelim)
|
| If(fp_iPotQuoteEnd = 0) then
| exit do
| End If
|
| If(fp_iPotQuoteEnd = fp_iMax - 1) then
| fp_iQuoteEnd = fp_iPotQuoteEnd
| fp_bQuoteFound = true
| exit do
| End If
|
| If(Mid(fp_sQry, fp_iPotQuoteEnd + 1, 1) <> fp_sQuoteDelim) then
| fp_iQuoteEnd = fp_iPotQuoteEnd
| fp_bQuoteFound = true
| else
| fp_iPotQuoteEnd = fp_iPotQuoteEnd + 2
| End If
| Loop
|
| If(fp_bQuoteFound = false) then
| Err.Description = "Unable to find a matching quote for " &
fp_sQuoteDelim
| & " in the query."
| fp_fError = true
| fp_bSkip = true
| End If
|
| If(fp_iColonStart > fp_iQuoteEnd) then 'there is no user input in this
| literal string
| fp_iCurrent = fp_iQuoteEnd + 1
| fp_bSkip = true
| End If
|
| else
| fp_iQuoteStart = fp_iColonStart
| fp_bQuoteFound = false
| End If
|
| If not fp_bSkip then
| fp_iStart = fp_iColonStart
| ' found a opening ::, find the close ::
| fp_iEnd = InStr(fp_iStart + 2, fp_sQry, "::")
|
| If not fp_bQuoteFound then
| fp_iQuoteEnd = fp_iEnd + 1
| End If
| If fp_iEnd = 0 Then
| fp_fError = True
| Response.Write "<B>Database Results Error: mismatched parameter
| delimiters</B>"
| Else
| fp_sField = Mid(fp_sQry, fp_iStart + 2, fp_iEnd - fp_iStart - 2)
| fp_sValue = Request.Form(fp_sField)
| if len(fp_sValue) = 0 then fp_sValue = Request.QueryString(fp_sField)
|
| ' if the named form field doesn't exist, make a note of it
| If (len(fp_sValue) = 0) Then
| fp_iStartField = InStr(fp_sDefault, fp_sField & "=")
| if fp_iStartField > 0 then
| fp_iStartField = fp_iStartField + len(fp_sField) + 1
| fp_iEndField = InStr(fp_iStartField,fp_sDefault,"&")
| if fp_iEndField > 0 then
| fp_sValue = Mid(fp_sDefault,fp_iStartField,fp_iEndField -
| fp_iStartField)
| else
| fp_sValue = Mid(fp_sDefault,fp_iStartField)
| end if
| end if
| End If
|
| ' remember names and values used in query
| if not fp_dictInputs.Exists(fp_sField) then
| fp_dictInputs.Add fp_sField, fp_sValue
| end if
|
| if (len(fp_sValue) = 0) Then fp_bBlankField = True
|
| fp_iOpEnd = fp_iQuoteStart - 1
|
| Do While (Mid (fp_sQry , fp_iOpEnd , 1) = " ")
| fp_iOpEnd = fp_iOpEnd - 1
| Loop
|
| fp_iFieldEnd = fp_iOpEnd
| If ( Mid(fp_sQry, fp_iOpEnd - 1, 2) = "<=") then
| fp_iFieldEnd = fp_iOpEnd - 2
| ElseIf (Mid(fp_sQry, fp_iOpEnd - 1, 2) = ">=") then
| fp_iFieldEnd = fp_iOpEnd - 2
| ElseIf (Mid(fp_sQry, fp_iOpEnd - 1, 2) = "<>") then
| fp_iFieldEnd = fp_iOpEnd - 2
| ElseIf (UCase(Mid(fp_sQry, fp_iOpEnd - 3, 4)) = "LIKE" ) then
| fp_iFieldEnd = fp_iOpEnd - 4
| ElseIf (Mid(fp_sQry, fp_iOpEnd, 1) = "=") then
| fp_iFieldEnd = fp_iOpEnd - 1
| ElseIf (Mid(fp_sQry, fp_iOpEnd, 1) = "<") then
| fp_iFieldEnd = fp_iOpEnd - 1
| ElseIf (Mid(fp_sQry, fp_iOpEnd, 1) = ">") then
| fp_iFieldEnd = fp_iOpEnd - 1
| End If
|
| If(fp_iFieldEnd <> fp_iOpEnd) Then
| Do While (fp_iFieldEnd) > 0 and (Mid(fp_sQry,fp_iFieldEnd,1) = " ")
| fp_iFieldEnd = fp_iFieldEnd - 1
| Loop
| fp_colNameDelim = ""
|
| If(fp_iFieldEnd) > 0 then
| fp_sTemp = Mid(fp_sQry,fp_iFieldEnd,1)
|
| If(InStr("])""",fp_sTemp)) then
| If(InStr("]",fp_sTemp)) then
| fp_colNameDelim = ".["
| ElseIf (InStr(")",fp_sTemp)) then
| fp_colNameDelim = ".("
| ElseIf (InStr("""",fp_sTemp)) then
| fp_colNameDelim = "."""
| End If
| 'In the End, we ignore the 'quote' character
| fp_iFieldEnd = fp_iFieldEnd - 1
| End If
| End If
|
| fp_iFieldStart = fp_iFieldEnd
| If (fp_colNameDelim = "") then
| fp_colNameDelim = " (."
| End If
|
| DO while (fp_iFieldStart > 0 and InStr(fp_colNameDelim,
| Mid(fp_sQry,fp_iFieldStart,1)) = 0)
| fp_iFieldStart = fp_iFieldStart - 1
| Loop
|
| fp_iFieldStart = fp_iFieldStart + 1
|
| fp_sColName = Mid(fp_sQry, fp_iFieldStart, fp_iFieldEnd -
fp_iFieldStart
| + 1)
|
| If( "NOT" = UCase(fp_sColName)) then
| fp_iFieldEnd = fp_iFieldStart - 1
| Do While (fp_iFieldEnd) > 0 and (Mid(fp_sQry,fp_iFieldEnd,1) = " ")
| fp_iFieldEnd = fp_iFieldEnd - 1
| Loop
|
| fp_colNameDelim = ""
|
| If(fp_iFieldEnd) > 0 then
| fp_sTemp = Mid(fp_sQry,fp_iFieldEnd,1)
|
| If(InStr("])""",fp_sTemp)) then
| If(InStr("]",fp_sTemp)) then
| fp_colNameDelim = ".["
| ElseIf (InStr(")",fp_sTemp)) then
| fp_colNameDelim = ".("
| ElseIf (InStr("""",fp_sTemp)) then
| fp_colNameDelim = "."""
| End If
| 'In the End, we ignore the 'quote' character
 
What error / problem are you getting now? You didn't say in your reply to
Stefan

--
David Berry
FrontPage Support: http://www.frontpagemvps.com/



Daytona Steve said:
I'm sorry to report it did not. Perhaps I should switch to Access?
(great,
a new software that I don't know how to use).

David Berry said:
So did that solve the problem?

--
David Berry
FrontPage Support: http://www.frontpagemvps.com/



Daytona Steve said:
Thank you. I'm actually experimeting on listingsv2.asp but this code
is
in
the head

<head>
<% ' FP_ASP -- ASP Automatically generated by a Frontpage Component. Do
not
Edit.
FP_LCID = 1033 %>
<meta http-equiv="Content-Language" content="en-us">
<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>Coldwell Banker All Stars Listings</title>
</head>


:

Make sure in http://www.bdmcdaytona.com/testcbas/listings.asp you have
in
the Head section

<%
' FP_ASP -- ASP Automatically generated by a Frontpage Component. Do
not
Edit.
FP_LCID=1033
%>

FP_LCID=1033
must be on a line by itself
--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


message
| OK, I searched the text and did not find LOCID. When I opened this
file, the
| third line already had a single quote,
|
| Here is the text of the file:
|
| <%
|
| FP_SetLocaleForPage
|
| ' determine whether or not to provide navigation controls
| if fp_iPageSize > 0 then
| fp_fShowNavbar = True
| else
| fp_fShowNavbar = False
| end if
|
| fp_sPagePath = Request.ServerVariables("PATH_INFO")
| fp_sEnvKey = fp_sPagePath & "#fpdbr_" & fp_iRegion
| fp_sFormName = "fpdbr_" & CStr(fp_iRegion)
| fp_sFormKey = fp_sFormName & "_PagingMove"
|
| fp_sInputs = fp_sDefault
|
| fp_DEBUG = False
|
| fp_sFirstLabel = " |< "
| fp_sPrevLabel = " < "
| fp_sNextLabel = " > "
| fp_sLastLabel = " >| "
| fp_sDashLabel = " -- "
|
| if not IsEmpty(Request(fp_sFormKey)) then
| fp_sMoveType = Request(fp_sFormKey)
| else
| fp_sMoveType = ""
| end if
|
| fp_iCurrent=1
| fp_fError=False
| fp_bBlankField=False
| Set fp_dictInputs = Server.CreateObject("Scripting.Dictionary")
| Set fp_dictParams = Server.CreateObject("Scripting.Dictionary")
| Set fp_dictColTypes = Server.CreateObject("Scripting.Dictionary")
| fp_iParam = 1
|
| fp_sQry = FP_ReplaceQuoteChars(fp_sQry)
|
| ' replace any input parameters in query string
| ' there need to be at least 5 more characters in the string for
there
to be
| input parameters (::[_a-z]::)
| Do While (Not fp_fError) And (fp_iCurrent + 5 < Len(fp_sQry) And
| Instr(fp_iCurrent, fp_sQry, "::") > 0)
| fp_iMax = Len(fp_sQry) + 1
| fp_iColonStart = Instr(fp_iCurrent, fp_sQry, "::")
| fp_iSQuoteStart = Instr(fp_iCurrent, fp_sQry, "'")
| fp_iDQuoteStart = Instr(fp_iCurrent, fp_sQry, """")
|
| If (fp_iSQuoteStart = 0) then
| fp_iSQuoteStart = fp_iMax
| End If
| If (fp_iDQuoteStart = 0) then
| fp_iDQuoteStart = fp_iMax
| End If
|
| fp_sQuoteDelim = ""
| fp_iQuoteStart = -1
| fp_iQuoteEnd = fp_iMax
| fp_bQuoteFound = false
| If (fp_iColonStart > fp_iSQuoteStart and fp_iDQuoteStart >
fp_iSQuoteStart)
| then 'single quote is first sought for character
| fp_sQuoteDelim = "'"
| fp_iQuoteStart = fp_iSQuoteStart
| elseIf (fp_iColonStart > fp_iDQuoteStart and fp_iSQuoteStart >
| fp_iDQuoteStart) then 'double quote is first sought for character
| fp_sQuoteDelim = """"
| fp_iQuoteStart = fp_iDQuoteStart
| else
| 'The :: comes before any ' or "
| End If
|
| If(fp_sQuoteDelim <> "") then
| fp_iPotQuoteEnd = fp_iQuoteStart + 1
| Do While (fp_bQuoteFound = false and fp_iPotQuoteEnd < fp_iMax)
| fp_iPotQuoteEnd = Instr(fp_iPotQuoteEnd, fp_sQry, fp_sQuoteDelim)
|
| If(fp_iPotQuoteEnd = 0) then
| exit do
| End If
|
| If(fp_iPotQuoteEnd = fp_iMax - 1) then
| fp_iQuoteEnd = fp_iPotQuoteEnd
| fp_bQuoteFound = true
| exit do
| End If
|
| If(Mid(fp_sQry, fp_iPotQuoteEnd + 1, 1) <> fp_sQuoteDelim) then
| fp_iQuoteEnd = fp_iPotQuoteEnd
| fp_bQuoteFound = true
| else
| fp_iPotQuoteEnd = fp_iPotQuoteEnd + 2
| End If
| Loop
|
| If(fp_bQuoteFound = false) then
| Err.Description = "Unable to find a matching quote for " &
fp_sQuoteDelim
| & " in the query."
| fp_fError = true
| fp_bSkip = true
| End If
|
| If(fp_iColonStart > fp_iQuoteEnd) then 'there is no user input in
this
| literal string
| fp_iCurrent = fp_iQuoteEnd + 1
| fp_bSkip = true
| End If
|
| else
| fp_iQuoteStart = fp_iColonStart
| fp_bQuoteFound = false
| End If
|
| If not fp_bSkip then
| fp_iStart = fp_iColonStart
| ' found a opening ::, find the close ::
| fp_iEnd = InStr(fp_iStart + 2, fp_sQry, "::")
|
| If not fp_bQuoteFound then
| fp_iQuoteEnd = fp_iEnd + 1
| End If
| If fp_iEnd = 0 Then
| fp_fError = True
| Response.Write "<B>Database Results Error: mismatched parameter
| delimiters</B>"
| Else
| fp_sField = Mid(fp_sQry, fp_iStart + 2, fp_iEnd - fp_iStart - 2)
| fp_sValue = Request.Form(fp_sField)
| if len(fp_sValue) = 0 then fp_sValue =
Request.QueryString(fp_sField)
|
| ' if the named form field doesn't exist, make a note of it
| If (len(fp_sValue) = 0) Then
| fp_iStartField = InStr(fp_sDefault, fp_sField & "=")
| if fp_iStartField > 0 then
| fp_iStartField = fp_iStartField + len(fp_sField) + 1
| fp_iEndField = InStr(fp_iStartField,fp_sDefault,"&")
| if fp_iEndField > 0 then
| fp_sValue = Mid(fp_sDefault,fp_iStartField,fp_iEndField -
| fp_iStartField)
| else
| fp_sValue = Mid(fp_sDefault,fp_iStartField)
| end if
| end if
| End If
|
| ' remember names and values used in query
| if not fp_dictInputs.Exists(fp_sField) then
| fp_dictInputs.Add fp_sField, fp_sValue
| end if
|
| if (len(fp_sValue) = 0) Then fp_bBlankField = True
|
| fp_iOpEnd = fp_iQuoteStart - 1
|
| Do While (Mid (fp_sQry , fp_iOpEnd , 1) = " ")
| fp_iOpEnd = fp_iOpEnd - 1
| Loop
|
| fp_iFieldEnd = fp_iOpEnd
| If ( Mid(fp_sQry, fp_iOpEnd - 1, 2) = "<=") then
| fp_iFieldEnd = fp_iOpEnd - 2
| ElseIf (Mid(fp_sQry, fp_iOpEnd - 1, 2) = ">=") then
| fp_iFieldEnd = fp_iOpEnd - 2
| ElseIf (Mid(fp_sQry, fp_iOpEnd - 1, 2) = "<>") then
| fp_iFieldEnd = fp_iOpEnd - 2
| ElseIf (UCase(Mid(fp_sQry, fp_iOpEnd - 3, 4)) = "LIKE" ) then
| fp_iFieldEnd = fp_iOpEnd - 4
| ElseIf (Mid(fp_sQry, fp_iOpEnd, 1) = "=") then
| fp_iFieldEnd = fp_iOpEnd - 1
| ElseIf (Mid(fp_sQry, fp_iOpEnd, 1) = "<") then
| fp_iFieldEnd = fp_iOpEnd - 1
| ElseIf (Mid(fp_sQry, fp_iOpEnd, 1) = ">") then
| fp_iFieldEnd = fp_iOpEnd - 1
| End If
|
| If(fp_iFieldEnd <> fp_iOpEnd) Then
| Do While (fp_iFieldEnd) > 0 and (Mid(fp_sQry,fp_iFieldEnd,1) = " ")
| fp_iFieldEnd = fp_iFieldEnd - 1
| Loop
| fp_colNameDelim = ""
|
| If(fp_iFieldEnd) > 0 then
| fp_sTemp = Mid(fp_sQry,fp_iFieldEnd,1)
|
| If(InStr("])""",fp_sTemp)) then
| If(InStr("]",fp_sTemp)) then
| fp_colNameDelim = ".["
| ElseIf (InStr(")",fp_sTemp)) then
| fp_colNameDelim = ".("
| ElseIf (InStr("""",fp_sTemp)) then
| fp_colNameDelim = "."""
| End If
| 'In the End, we ignore the 'quote' character
| fp_iFieldEnd = fp_iFieldEnd - 1
| End If
| End If
|
| fp_iFieldStart = fp_iFieldEnd
| If (fp_colNameDelim = "") then
| fp_colNameDelim = " (."
| End If
|
| DO while (fp_iFieldStart > 0 and InStr(fp_colNameDelim,
| Mid(fp_sQry,fp_iFieldStart,1)) = 0)
| fp_iFieldStart = fp_iFieldStart - 1
| Loop
|
| fp_iFieldStart = fp_iFieldStart + 1
|
| fp_sColName = Mid(fp_sQry, fp_iFieldStart, fp_iFieldEnd -
fp_iFieldStart
| + 1)
|
| If( "NOT" = UCase(fp_sColName)) then
| fp_iFieldEnd = fp_iFieldStart - 1
| Do While (fp_iFieldEnd) > 0 and (Mid(fp_sQry,fp_iFieldEnd,1) = " ")
| fp_iFieldEnd = fp_iFieldEnd - 1
| Loop
|
| fp_colNameDelim = ""
|
| If(fp_iFieldEnd) > 0 then
| fp_sTemp = Mid(fp_sQry,fp_iFieldEnd,1)
|
| If(InStr("])""",fp_sTemp)) then
| If(InStr("]",fp_sTemp)) then
| fp_colNameDelim = ".["
| ElseIf (InStr(")",fp_sTemp)) then
| fp_colNameDelim = ".("
| ElseIf (InStr("""",fp_sTemp)) then
| fp_colNameDelim = "."""
| End If
| 'In the End, we ignore the 'quote' character
 
Sorry, getting confused, don't know how you guys keep it straight...

The answer to his question was yes, the code was there and the error on the
page is:

Microsoft VBScript runtime error '800a000d'
Type mismatch: 'FP_SetLocaleForPage'

/testcbas/_fpclass/fpdbrgn1.inc, line 3

I beleive it is the same error as before.

The page is:

http://www.bdmcdaytona.com/testcbas/listingsv2.asp

This is my test page for this exercise and the page I've used for all of the
changes. It is also where the code resides that I have posted.

The original page, which Stafan referenced was
http://www.bdmcdaytona.com/testcbas/listings.asp which hasn't changed and is
working fine except for the currancy format.



David Berry said:
What error / problem are you getting now? You didn't say in your reply to
Stefan

--
David Berry
FrontPage Support: http://www.frontpagemvps.com/



Daytona Steve said:
I'm sorry to report it did not. Perhaps I should switch to Access?
(great,
a new software that I don't know how to use).

David Berry said:
So did that solve the problem?

--
David Berry
FrontPage Support: http://www.frontpagemvps.com/



Thank you. I'm actually experimeting on listingsv2.asp but this code
is
in
the head

<head>
<% ' FP_ASP -- ASP Automatically generated by a Frontpage Component. Do
not
Edit.
FP_LCID = 1033 %>
<meta http-equiv="Content-Language" content="en-us">
<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>Coldwell Banker All Stars Listings</title>
</head>


:

Make sure in http://www.bdmcdaytona.com/testcbas/listings.asp you have
in
the Head section

<%
' FP_ASP -- ASP Automatically generated by a Frontpage Component. Do
not
Edit.
FP_LCID=1033
%>

FP_LCID=1033
must be on a line by itself
--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


message
| OK, I searched the text and did not find LOCID. When I opened this
file, the
| third line already had a single quote,
|
| Here is the text of the file:
|
| <%
|
| FP_SetLocaleForPage
|
| ' determine whether or not to provide navigation controls
| if fp_iPageSize > 0 then
| fp_fShowNavbar = True
| else
| fp_fShowNavbar = False
| end if
|
| fp_sPagePath = Request.ServerVariables("PATH_INFO")
| fp_sEnvKey = fp_sPagePath & "#fpdbr_" & fp_iRegion
| fp_sFormName = "fpdbr_" & CStr(fp_iRegion)
| fp_sFormKey = fp_sFormName & "_PagingMove"
|
| fp_sInputs = fp_sDefault
|
| fp_DEBUG = False
|
| fp_sFirstLabel = " |< "
| fp_sPrevLabel = " < "
| fp_sNextLabel = " > "
| fp_sLastLabel = " >| "
| fp_sDashLabel = " -- "
|
| if not IsEmpty(Request(fp_sFormKey)) then
| fp_sMoveType = Request(fp_sFormKey)
| else
| fp_sMoveType = ""
| end if
|
| fp_iCurrent=1
| fp_fError=False
| fp_bBlankField=False
| Set fp_dictInputs = Server.CreateObject("Scripting.Dictionary")
| Set fp_dictParams = Server.CreateObject("Scripting.Dictionary")
| Set fp_dictColTypes = Server.CreateObject("Scripting.Dictionary")
| fp_iParam = 1
|
| fp_sQry = FP_ReplaceQuoteChars(fp_sQry)
|
| ' replace any input parameters in query string
| ' there need to be at least 5 more characters in the string for
there
to be
| input parameters (::[_a-z]::)
| Do While (Not fp_fError) And (fp_iCurrent + 5 < Len(fp_sQry) And
| Instr(fp_iCurrent, fp_sQry, "::") > 0)
| fp_iMax = Len(fp_sQry) + 1
| fp_iColonStart = Instr(fp_iCurrent, fp_sQry, "::")
| fp_iSQuoteStart = Instr(fp_iCurrent, fp_sQry, "'")
| fp_iDQuoteStart = Instr(fp_iCurrent, fp_sQry, """")
|
| If (fp_iSQuoteStart = 0) then
| fp_iSQuoteStart = fp_iMax
| End If
| If (fp_iDQuoteStart = 0) then
| fp_iDQuoteStart = fp_iMax
| End If
|
| fp_sQuoteDelim = ""
| fp_iQuoteStart = -1
| fp_iQuoteEnd = fp_iMax
| fp_bQuoteFound = false
| If (fp_iColonStart > fp_iSQuoteStart and fp_iDQuoteStart >
fp_iSQuoteStart)
| then 'single quote is first sought for character
| fp_sQuoteDelim = "'"
| fp_iQuoteStart = fp_iSQuoteStart
| elseIf (fp_iColonStart > fp_iDQuoteStart and fp_iSQuoteStart >
| fp_iDQuoteStart) then 'double quote is first sought for character
| fp_sQuoteDelim = """"
| fp_iQuoteStart = fp_iDQuoteStart
| else
| 'The :: comes before any ' or "
| End If
|
| If(fp_sQuoteDelim <> "") then
| fp_iPotQuoteEnd = fp_iQuoteStart + 1
| Do While (fp_bQuoteFound = false and fp_iPotQuoteEnd < fp_iMax)
| fp_iPotQuoteEnd = Instr(fp_iPotQuoteEnd, fp_sQry, fp_sQuoteDelim)
|
| If(fp_iPotQuoteEnd = 0) then
| exit do
| End If
|
| If(fp_iPotQuoteEnd = fp_iMax - 1) then
| fp_iQuoteEnd = fp_iPotQuoteEnd
| fp_bQuoteFound = true
| exit do
| End If
|
| If(Mid(fp_sQry, fp_iPotQuoteEnd + 1, 1) <> fp_sQuoteDelim) then
| fp_iQuoteEnd = fp_iPotQuoteEnd
| fp_bQuoteFound = true
| else
| fp_iPotQuoteEnd = fp_iPotQuoteEnd + 2
| End If
| Loop
|
| If(fp_bQuoteFound = false) then
| Err.Description = "Unable to find a matching quote for " &
fp_sQuoteDelim
| & " in the query."
| fp_fError = true
| fp_bSkip = true
| End If
|
| If(fp_iColonStart > fp_iQuoteEnd) then 'there is no user input in
this
| literal string
| fp_iCurrent = fp_iQuoteEnd + 1
| fp_bSkip = true
| End If
|
| else
| fp_iQuoteStart = fp_iColonStart
| fp_bQuoteFound = false
| End If
|
| If not fp_bSkip then
| fp_iStart = fp_iColonStart
| ' found a opening ::, find the close ::
| fp_iEnd = InStr(fp_iStart + 2, fp_sQry, "::")
|
| If not fp_bQuoteFound then
| fp_iQuoteEnd = fp_iEnd + 1
| End If
| If fp_iEnd = 0 Then
| fp_fError = True
| Response.Write "<B>Database Results Error: mismatched parameter
| delimiters</B>"
| Else
| fp_sField = Mid(fp_sQry, fp_iStart + 2, fp_iEnd - fp_iStart - 2)
| fp_sValue = Request.Form(fp_sField)
| if len(fp_sValue) = 0 then fp_sValue =
Request.QueryString(fp_sField)
|
| ' if the named form field doesn't exist, make a note of it
| If (len(fp_sValue) = 0) Then
| fp_iStartField = InStr(fp_sDefault, fp_sField & "=")
| if fp_iStartField > 0 then
| fp_iStartField = fp_iStartField + len(fp_sField) + 1
| fp_iEndField = InStr(fp_iStartField,fp_sDefault,"&")
| if fp_iEndField > 0 then
| fp_sValue = Mid(fp_sDefault,fp_iStartField,fp_iEndField -
| fp_iStartField)
| else
| fp_sValue = Mid(fp_sDefault,fp_iStartField)
| end if
| end if
| End If
|
| ' remember names and values used in query
| if not fp_dictInputs.Exists(fp_sField) then
| fp_dictInputs.Add fp_sField, fp_sValue
| end if
|
| if (len(fp_sValue) = 0) Then fp_bBlankField = True
|
| fp_iOpEnd = fp_iQuoteStart - 1
|
| Do While (Mid (fp_sQry , fp_iOpEnd , 1) = " ")
| fp_iOpEnd = fp_iOpEnd - 1
| Loop
|
| fp_iFieldEnd = fp_iOpEnd
| If ( Mid(fp_sQry, fp_iOpEnd - 1, 2) = "<=") then
| fp_iFieldEnd = fp_iOpEnd - 2
| ElseIf (Mid(fp_sQry, fp_iOpEnd - 1, 2) = ">=") then
| fp_iFieldEnd = fp_iOpEnd - 2
| ElseIf (Mid(fp_sQry, fp_iOpEnd - 1, 2) = "<>") then
| fp_iFieldEnd = fp_iOpEnd - 2
| ElseIf (UCase(Mid(fp_sQry, fp_iOpEnd - 3, 4)) = "LIKE" ) then
| fp_iFieldEnd = fp_iOpEnd - 4
| ElseIf (Mid(fp_sQry, fp_iOpEnd, 1) = "=") then
| fp_iFieldEnd = fp_iOpEnd - 1
| ElseIf (Mid(fp_sQry, fp_iOpEnd, 1) = "<") then
| fp_iFieldEnd = fp_iOpEnd - 1
| ElseIf (Mid(fp_sQry, fp_iOpEnd, 1) = ">") then
| fp_iFieldEnd = fp_iOpEnd - 1
| End If
|
| If(fp_iFieldEnd <> fp_iOpEnd) Then
| Do While (fp_iFieldEnd) > 0 and (Mid(fp_sQry,fp_iFieldEnd,1) = " ")
| fp_iFieldEnd = fp_iFieldEnd - 1
| Loop
| fp_colNameDelim = ""
|
| If(fp_iFieldEnd) > 0 then
| fp_sTemp = Mid(fp_sQry,fp_iFieldEnd,1)
|
| If(InStr("])""",fp_sTemp)) then
| If(InStr("]",fp_sTemp)) then
| fp_colNameDelim = ".["
| ElseIf (InStr(")",fp_sTemp)) then
| fp_colNameDelim = ".("
| ElseIf (InStr("""",fp_sTemp)) then
| fp_colNameDelim = "."""
| End If
| 'In the End, we ignore the 'quote' character
| fp_iFieldEnd = fp_iFieldEnd - 1
| End If
| End If
|
| fp_iFieldStart = fp_iFieldEnd
| If (fp_colNameDelim = "") then
| fp_colNameDelim = " (."
| End If
|
| DO while (fp_iFieldStart > 0 and InStr(fp_colNameDelim,
| Mid(fp_sQry,fp_iFieldStart,1)) = 0)
| fp_iFieldStart = fp_iFieldStart - 1
| Loop
|
| fp_iFieldStart = fp_iFieldStart + 1
 
Type mismatch usually means you've got a string when it should be an integer
(or date etc) or vice versa. I'm not sure what this error means since I
don't use the FP DRW. If the original page
(http://www.bdmcdaytona.com/testcbas/listings.asp ) is working then why not
just use that one and fix the currency format using the sample code I gave
you before?

SELECT Description, Office, Bedroom, Bathrooms, Agent,
Format(Price,'$#,##0.00') as PriceField FROM .........

Then where it says:

<%=FP_FieldVal(fp_rs,"Price")%>

You'd make that"

<%=FP_FieldVal(fp_rs,"PriceField")%>

(the select should be all on one line)

--
David Berry
FrontPage Support: http://www.frontpagemvps.com/



Daytona Steve said:
Sorry, getting confused, don't know how you guys keep it straight...

The answer to his question was yes, the code was there and the error on
the
page is:

Microsoft VBScript runtime error '800a000d'
Type mismatch: 'FP_SetLocaleForPage'

/testcbas/_fpclass/fpdbrgn1.inc, line 3

I beleive it is the same error as before.

The page is:

http://www.bdmcdaytona.com/testcbas/listingsv2.asp

This is my test page for this exercise and the page I've used for all of
the
changes. It is also where the code resides that I have posted.

The original page, which Stafan referenced was
http://www.bdmcdaytona.com/testcbas/listings.asp which hasn't changed and
is
working fine except for the currancy format.



David Berry said:
What error / problem are you getting now? You didn't say in your reply to
Stefan

--
David Berry
FrontPage Support: http://www.frontpagemvps.com/



Daytona Steve said:
I'm sorry to report it did not. Perhaps I should switch to Access?
(great,
a new software that I don't know how to use).

:

So did that solve the problem?

--
David Berry
FrontPage Support: http://www.frontpagemvps.com/



message
Thank you. I'm actually experimeting on listingsv2.asp but this
code
is
in
the head

<head>
<% ' FP_ASP -- ASP Automatically generated by a Frontpage Component.
Do
not
Edit.
FP_LCID = 1033 %>
<meta http-equiv="Content-Language" content="en-us">
<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>Coldwell Banker All Stars Listings</title>
</head>


:

Make sure in http://www.bdmcdaytona.com/testcbas/listings.asp you
have
in
the Head section

<%
' FP_ASP -- ASP Automatically generated by a Frontpage Component.
Do
not
Edit.
FP_LCID=1033
%>

FP_LCID=1033
must be on a line by itself
--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


message
| OK, I searched the text and did not find LOCID. When I opened
this
file, the
| third line already had a single quote,
|
| Here is the text of the file:
|
| <%
|
| FP_SetLocaleForPage
|
| ' determine whether or not to provide navigation controls
| if fp_iPageSize > 0 then
| fp_fShowNavbar = True
| else
| fp_fShowNavbar = False
| end if
|
| fp_sPagePath = Request.ServerVariables("PATH_INFO")
| fp_sEnvKey = fp_sPagePath & "#fpdbr_" & fp_iRegion
| fp_sFormName = "fpdbr_" & CStr(fp_iRegion)
| fp_sFormKey = fp_sFormName & "_PagingMove"
|
| fp_sInputs = fp_sDefault
|
| fp_DEBUG = False
|
| fp_sFirstLabel = " |< "
| fp_sPrevLabel = " < "
| fp_sNextLabel = " > "
| fp_sLastLabel = " >| "
| fp_sDashLabel = " -- "
|
| if not IsEmpty(Request(fp_sFormKey)) then
| fp_sMoveType = Request(fp_sFormKey)
| else
| fp_sMoveType = ""
| end if
|
| fp_iCurrent=1
| fp_fError=False
| fp_bBlankField=False
| Set fp_dictInputs = Server.CreateObject("Scripting.Dictionary")
| Set fp_dictParams = Server.CreateObject("Scripting.Dictionary")
| Set fp_dictColTypes = Server.CreateObject("Scripting.Dictionary")
| fp_iParam = 1
|
| fp_sQry = FP_ReplaceQuoteChars(fp_sQry)
|
| ' replace any input parameters in query string
| ' there need to be at least 5 more characters in the string for
there
to be
| input parameters (::[_a-z]::)
| Do While (Not fp_fError) And (fp_iCurrent + 5 < Len(fp_sQry) And
| Instr(fp_iCurrent, fp_sQry, "::") > 0)
| fp_iMax = Len(fp_sQry) + 1
| fp_iColonStart = Instr(fp_iCurrent, fp_sQry, "::")
| fp_iSQuoteStart = Instr(fp_iCurrent, fp_sQry, "'")
| fp_iDQuoteStart = Instr(fp_iCurrent, fp_sQry, """")
|
| If (fp_iSQuoteStart = 0) then
| fp_iSQuoteStart = fp_iMax
| End If
| If (fp_iDQuoteStart = 0) then
| fp_iDQuoteStart = fp_iMax
| End If
|
| fp_sQuoteDelim = ""
| fp_iQuoteStart = -1
| fp_iQuoteEnd = fp_iMax
| fp_bQuoteFound = false
| If (fp_iColonStart > fp_iSQuoteStart and fp_iDQuoteStart >
fp_iSQuoteStart)
| then 'single quote is first sought for character
| fp_sQuoteDelim = "'"
| fp_iQuoteStart = fp_iSQuoteStart
| elseIf (fp_iColonStart > fp_iDQuoteStart and fp_iSQuoteStart >
| fp_iDQuoteStart) then 'double quote is first sought for character
| fp_sQuoteDelim = """"
| fp_iQuoteStart = fp_iDQuoteStart
| else
| 'The :: comes before any ' or "
| End If
|
| If(fp_sQuoteDelim <> "") then
| fp_iPotQuoteEnd = fp_iQuoteStart + 1
| Do While (fp_bQuoteFound = false and fp_iPotQuoteEnd < fp_iMax)
| fp_iPotQuoteEnd = Instr(fp_iPotQuoteEnd, fp_sQry, fp_sQuoteDelim)
|
| If(fp_iPotQuoteEnd = 0) then
| exit do
| End If
|
| If(fp_iPotQuoteEnd = fp_iMax - 1) then
| fp_iQuoteEnd = fp_iPotQuoteEnd
| fp_bQuoteFound = true
| exit do
| End If
|
| If(Mid(fp_sQry, fp_iPotQuoteEnd + 1, 1) <> fp_sQuoteDelim) then
| fp_iQuoteEnd = fp_iPotQuoteEnd
| fp_bQuoteFound = true
| else
| fp_iPotQuoteEnd = fp_iPotQuoteEnd + 2
| End If
| Loop
|
| If(fp_bQuoteFound = false) then
| Err.Description = "Unable to find a matching quote for " &
fp_sQuoteDelim
| & " in the query."
| fp_fError = true
| fp_bSkip = true
| End If
|
| If(fp_iColonStart > fp_iQuoteEnd) then 'there is no user input in
this
| literal string
| fp_iCurrent = fp_iQuoteEnd + 1
| fp_bSkip = true
| End If
|
| else
| fp_iQuoteStart = fp_iColonStart
| fp_bQuoteFound = false
| End If
|
| If not fp_bSkip then
| fp_iStart = fp_iColonStart
| ' found a opening ::, find the close ::
| fp_iEnd = InStr(fp_iStart + 2, fp_sQry, "::")
|
| If not fp_bQuoteFound then
| fp_iQuoteEnd = fp_iEnd + 1
| End If
| If fp_iEnd = 0 Then
| fp_fError = True
| Response.Write "<B>Database Results Error: mismatched parameter
| delimiters</B>"
| Else
| fp_sField = Mid(fp_sQry, fp_iStart + 2, fp_iEnd - fp_iStart - 2)
| fp_sValue = Request.Form(fp_sField)
| if len(fp_sValue) = 0 then fp_sValue =
Request.QueryString(fp_sField)
|
| ' if the named form field doesn't exist, make a note of it
| If (len(fp_sValue) = 0) Then
| fp_iStartField = InStr(fp_sDefault, fp_sField & "=")
| if fp_iStartField > 0 then
| fp_iStartField = fp_iStartField + len(fp_sField) + 1
| fp_iEndField = InStr(fp_iStartField,fp_sDefault,"&")
| if fp_iEndField > 0 then
| fp_sValue = Mid(fp_sDefault,fp_iStartField,fp_iEndField -
| fp_iStartField)
| else
| fp_sValue = Mid(fp_sDefault,fp_iStartField)
| end if
| end if
| End If
|
| ' remember names and values used in query
| if not fp_dictInputs.Exists(fp_sField) then
| fp_dictInputs.Add fp_sField, fp_sValue
| end if
|
| if (len(fp_sValue) = 0) Then fp_bBlankField = True
|
| fp_iOpEnd = fp_iQuoteStart - 1
|
| Do While (Mid (fp_sQry , fp_iOpEnd , 1) = " ")
| fp_iOpEnd = fp_iOpEnd - 1
| Loop
|
| fp_iFieldEnd = fp_iOpEnd
| If ( Mid(fp_sQry, fp_iOpEnd - 1, 2) = "<=") then
| fp_iFieldEnd = fp_iOpEnd - 2
| ElseIf (Mid(fp_sQry, fp_iOpEnd - 1, 2) = ">=") then
| fp_iFieldEnd = fp_iOpEnd - 2
| ElseIf (Mid(fp_sQry, fp_iOpEnd - 1, 2) = "<>") then
| fp_iFieldEnd = fp_iOpEnd - 2
| ElseIf (UCase(Mid(fp_sQry, fp_iOpEnd - 3, 4)) = "LIKE" ) then
| fp_iFieldEnd = fp_iOpEnd - 4
| ElseIf (Mid(fp_sQry, fp_iOpEnd, 1) = "=") then
| fp_iFieldEnd = fp_iOpEnd - 1
| ElseIf (Mid(fp_sQry, fp_iOpEnd, 1) = "<") then
| fp_iFieldEnd = fp_iOpEnd - 1
| ElseIf (Mid(fp_sQry, fp_iOpEnd, 1) = ">") then
| fp_iFieldEnd = fp_iOpEnd - 1
| End If
|
| If(fp_iFieldEnd <> fp_iOpEnd) Then
| Do While (fp_iFieldEnd) > 0 and (Mid(fp_sQry,fp_iFieldEnd,1) = "
")
| fp_iFieldEnd = fp_iFieldEnd - 1
| Loop
| fp_colNameDelim = ""
|
| If(fp_iFieldEnd) > 0 then
| fp_sTemp = Mid(fp_sQry,fp_iFieldEnd,1)
|
| If(InStr("])""",fp_sTemp)) then
| If(InStr("]",fp_sTemp)) then
| fp_colNameDelim = ".["
| ElseIf (InStr(")",fp_sTemp)) then
| fp_colNameDelim = ".("
| ElseIf (InStr("""",fp_sTemp)) then
| fp_colNameDelim = "."""
| End If
| 'In the End, we ignore the 'quote' character
| fp_iFieldEnd = fp_iFieldEnd - 1
| End If
| End If
|
| fp_iFieldStart = fp_iFieldEnd
| If (fp_colNameDelim = "") then
| fp_colNameDelim = " (."
| End If
|
| DO while (fp_iFieldStart > 0 and InStr(fp_colNameDelim,
| Mid(fp_sQry,fp_iFieldStart,1)) = 0)
| fp_iFieldStart = fp_iFieldStart - 1
| Loop
|
| fp_iFieldStart = fp_iFieldStart + 1
 
I tried it, see my third post, 5th in the string on March 19. That's when I
producted my first error.

David Berry said:
Type mismatch usually means you've got a string when it should be an integer
(or date etc) or vice versa. I'm not sure what this error means since I
don't use the FP DRW. If the original page
(http://www.bdmcdaytona.com/testcbas/listings.asp ) is working then why not
just use that one and fix the currency format using the sample code I gave
you before?

SELECT Description, Office, Bedroom, Bathrooms, Agent,
Format(Price,'$#,##0.00') as PriceField FROM .........

Then where it says:

<%=FP_FieldVal(fp_rs,"Price")%>

You'd make that"

<%=FP_FieldVal(fp_rs,"PriceField")%>

(the select should be all on one line)

--
David Berry
FrontPage Support: http://www.frontpagemvps.com/



Daytona Steve said:
Sorry, getting confused, don't know how you guys keep it straight...

The answer to his question was yes, the code was there and the error on
the
page is:

Microsoft VBScript runtime error '800a000d'
Type mismatch: 'FP_SetLocaleForPage'

/testcbas/_fpclass/fpdbrgn1.inc, line 3

I beleive it is the same error as before.

The page is:

http://www.bdmcdaytona.com/testcbas/listingsv2.asp

This is my test page for this exercise and the page I've used for all of
the
changes. It is also where the code resides that I have posted.

The original page, which Stafan referenced was
http://www.bdmcdaytona.com/testcbas/listings.asp which hasn't changed and
is
working fine except for the currancy format.



David Berry said:
What error / problem are you getting now? You didn't say in your reply to
Stefan

--
David Berry
FrontPage Support: http://www.frontpagemvps.com/



I'm sorry to report it did not. Perhaps I should switch to Access?
(great,
a new software that I don't know how to use).

:

So did that solve the problem?

--
David Berry
FrontPage Support: http://www.frontpagemvps.com/



message
Thank you. I'm actually experimeting on listingsv2.asp but this
code
is
in
the head

<head>
<% ' FP_ASP -- ASP Automatically generated by a Frontpage Component.
Do
not
Edit.
FP_LCID = 1033 %>
<meta http-equiv="Content-Language" content="en-us">
<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>Coldwell Banker All Stars Listings</title>
</head>


:

Make sure in http://www.bdmcdaytona.com/testcbas/listings.asp you
have
in
the Head section

<%
' FP_ASP -- ASP Automatically generated by a Frontpage Component.
Do
not
Edit.
FP_LCID=1033
%>

FP_LCID=1033
must be on a line by itself
--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


message
| OK, I searched the text and did not find LOCID. When I opened
this
file, the
| third line already had a single quote,
|
| Here is the text of the file:
|
| <%
|
| FP_SetLocaleForPage
|
| ' determine whether or not to provide navigation controls
| if fp_iPageSize > 0 then
| fp_fShowNavbar = True
| else
| fp_fShowNavbar = False
| end if
|
| fp_sPagePath = Request.ServerVariables("PATH_INFO")
| fp_sEnvKey = fp_sPagePath & "#fpdbr_" & fp_iRegion
| fp_sFormName = "fpdbr_" & CStr(fp_iRegion)
| fp_sFormKey = fp_sFormName & "_PagingMove"
|
| fp_sInputs = fp_sDefault
|
| fp_DEBUG = False
|
| fp_sFirstLabel = " |< "
| fp_sPrevLabel = " < "
| fp_sNextLabel = " > "
| fp_sLastLabel = " >| "
| fp_sDashLabel = " -- "
|
| if not IsEmpty(Request(fp_sFormKey)) then
| fp_sMoveType = Request(fp_sFormKey)
| else
| fp_sMoveType = ""
| end if
|
| fp_iCurrent=1
| fp_fError=False
| fp_bBlankField=False
| Set fp_dictInputs = Server.CreateObject("Scripting.Dictionary")
| Set fp_dictParams = Server.CreateObject("Scripting.Dictionary")
| Set fp_dictColTypes = Server.CreateObject("Scripting.Dictionary")
| fp_iParam = 1
|
| fp_sQry = FP_ReplaceQuoteChars(fp_sQry)
|
| ' replace any input parameters in query string
| ' there need to be at least 5 more characters in the string for
there
to be
| input parameters (::[_a-z]::)
| Do While (Not fp_fError) And (fp_iCurrent + 5 < Len(fp_sQry) And
| Instr(fp_iCurrent, fp_sQry, "::") > 0)
| fp_iMax = Len(fp_sQry) + 1
| fp_iColonStart = Instr(fp_iCurrent, fp_sQry, "::")
| fp_iSQuoteStart = Instr(fp_iCurrent, fp_sQry, "'")
| fp_iDQuoteStart = Instr(fp_iCurrent, fp_sQry, """")
|
| If (fp_iSQuoteStart = 0) then
| fp_iSQuoteStart = fp_iMax
| End If
| If (fp_iDQuoteStart = 0) then
| fp_iDQuoteStart = fp_iMax
| End If
|
| fp_sQuoteDelim = ""
| fp_iQuoteStart = -1
| fp_iQuoteEnd = fp_iMax
| fp_bQuoteFound = false
| If (fp_iColonStart > fp_iSQuoteStart and fp_iDQuoteStart >
fp_iSQuoteStart)
| then 'single quote is first sought for character
| fp_sQuoteDelim = "'"
| fp_iQuoteStart = fp_iSQuoteStart
| elseIf (fp_iColonStart > fp_iDQuoteStart and fp_iSQuoteStart >
| fp_iDQuoteStart) then 'double quote is first sought for character
| fp_sQuoteDelim = """"
| fp_iQuoteStart = fp_iDQuoteStart
| else
| 'The :: comes before any ' or "
| End If
|
| If(fp_sQuoteDelim <> "") then
| fp_iPotQuoteEnd = fp_iQuoteStart + 1
| Do While (fp_bQuoteFound = false and fp_iPotQuoteEnd < fp_iMax)
| fp_iPotQuoteEnd = Instr(fp_iPotQuoteEnd, fp_sQry, fp_sQuoteDelim)
|
| If(fp_iPotQuoteEnd = 0) then
| exit do
| End If
|
| If(fp_iPotQuoteEnd = fp_iMax - 1) then
| fp_iQuoteEnd = fp_iPotQuoteEnd
| fp_bQuoteFound = true
| exit do
| End If
|
| If(Mid(fp_sQry, fp_iPotQuoteEnd + 1, 1) <> fp_sQuoteDelim) then
| fp_iQuoteEnd = fp_iPotQuoteEnd
| fp_bQuoteFound = true
| else
| fp_iPotQuoteEnd = fp_iPotQuoteEnd + 2
| End If
| Loop
|
| If(fp_bQuoteFound = false) then
| Err.Description = "Unable to find a matching quote for " &
fp_sQuoteDelim
| & " in the query."
| fp_fError = true
| fp_bSkip = true
| End If
|
| If(fp_iColonStart > fp_iQuoteEnd) then 'there is no user input in
this
| literal string
| fp_iCurrent = fp_iQuoteEnd + 1
| fp_bSkip = true
| End If
|
| else
| fp_iQuoteStart = fp_iColonStart
| fp_bQuoteFound = false
| End If
|
| If not fp_bSkip then
| fp_iStart = fp_iColonStart
| ' found a opening ::, find the close ::
| fp_iEnd = InStr(fp_iStart + 2, fp_sQry, "::")
|
| If not fp_bQuoteFound then
| fp_iQuoteEnd = fp_iEnd + 1
| End If
| If fp_iEnd = 0 Then
| fp_fError = True
| Response.Write "<B>Database Results Error: mismatched parameter
| delimiters</B>"
| Else
| fp_sField = Mid(fp_sQry, fp_iStart + 2, fp_iEnd - fp_iStart - 2)
| fp_sValue = Request.Form(fp_sField)
| if len(fp_sValue) = 0 then fp_sValue =
Request.QueryString(fp_sField)
|
| ' if the named form field doesn't exist, make a note of it
| If (len(fp_sValue) = 0) Then
| fp_iStartField = InStr(fp_sDefault, fp_sField & "=")
| if fp_iStartField > 0 then
| fp_iStartField = fp_iStartField + len(fp_sField) + 1
| fp_iEndField = InStr(fp_iStartField,fp_sDefault,"&")
| if fp_iEndField > 0 then
| fp_sValue = Mid(fp_sDefault,fp_iStartField,fp_iEndField -
| fp_iStartField)
| else
| fp_sValue = Mid(fp_sDefault,fp_iStartField)
| end if
| end if
 
Sorry, I'm losing track of all the threads. So just adding the Formatting
causes the Type mismatch: 'FP_SetLocaleForPage' error? This is why I hate
the FP database wizard.


--
David Berry
FrontPage Support: http://www.frontpagemvps.com/



Daytona Steve said:
I tried it, see my third post, 5th in the string on March 19. That's when
I
producted my first error.

David Berry said:
Type mismatch usually means you've got a string when it should be an
integer
(or date etc) or vice versa. I'm not sure what this error means since I
don't use the FP DRW. If the original page
(http://www.bdmcdaytona.com/testcbas/listings.asp ) is working then why
not
just use that one and fix the currency format using the sample code I
gave
you before?

SELECT Description, Office, Bedroom, Bathrooms, Agent,
Format(Price,'$#,##0.00') as PriceField FROM .........

Then where it says:

<%=FP_FieldVal(fp_rs,"Price")%>

You'd make that"

<%=FP_FieldVal(fp_rs,"PriceField")%>

(the select should be all on one line)

--
David Berry
FrontPage Support: http://www.frontpagemvps.com/



Daytona Steve said:
Sorry, getting confused, don't know how you guys keep it straight...

The answer to his question was yes, the code was there and the error on
the
page is:

Microsoft VBScript runtime error '800a000d'
Type mismatch: 'FP_SetLocaleForPage'

/testcbas/_fpclass/fpdbrgn1.inc, line 3

I beleive it is the same error as before.

The page is:

http://www.bdmcdaytona.com/testcbas/listingsv2.asp

This is my test page for this exercise and the page I've used for all
of
the
changes. It is also where the code resides that I have posted.

The original page, which Stafan referenced was
http://www.bdmcdaytona.com/testcbas/listings.asp which hasn't changed
and
is
working fine except for the currancy format.



:

What error / problem are you getting now? You didn't say in your reply
to
Stefan

--
David Berry
FrontPage Support: http://www.frontpagemvps.com/



message
I'm sorry to report it did not. Perhaps I should switch to Access?
(great,
a new software that I don't know how to use).

:

So did that solve the problem?

--
David Berry
FrontPage Support: http://www.frontpagemvps.com/



message
Thank you. I'm actually experimeting on listingsv2.asp but this
code
is
in
the head

<head>
<% ' FP_ASP -- ASP Automatically generated by a Frontpage
Component.
Do
not
Edit.
FP_LCID = 1033 %>
<meta http-equiv="Content-Language" content="en-us">
<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>Coldwell Banker All Stars Listings</title>
</head>


:

Make sure in http://www.bdmcdaytona.com/testcbas/listings.asp
you
have
in
the Head section

<%
' FP_ASP -- ASP Automatically generated by a Frontpage
Component.
Do
not
Edit.
FP_LCID=1033
%>

FP_LCID=1033
must be on a line by itself
--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


in
message
| OK, I searched the text and did not find LOCID. When I opened
this
file, the
| third line already had a single quote,
|
| Here is the text of the file:
|
| <%
|
| FP_SetLocaleForPage
|
| ' determine whether or not to provide navigation controls
| if fp_iPageSize > 0 then
| fp_fShowNavbar = True
| else
| fp_fShowNavbar = False
| end if
|
| fp_sPagePath = Request.ServerVariables("PATH_INFO")
| fp_sEnvKey = fp_sPagePath & "#fpdbr_" & fp_iRegion
| fp_sFormName = "fpdbr_" & CStr(fp_iRegion)
| fp_sFormKey = fp_sFormName & "_PagingMove"
|
| fp_sInputs = fp_sDefault
|
| fp_DEBUG = False
|
| fp_sFirstLabel = " |< "
| fp_sPrevLabel = " < "
| fp_sNextLabel = " > "
| fp_sLastLabel = " >| "
| fp_sDashLabel = " -- "
|
| if not IsEmpty(Request(fp_sFormKey)) then
| fp_sMoveType = Request(fp_sFormKey)
| else
| fp_sMoveType = ""
| end if
|
| fp_iCurrent=1
| fp_fError=False
| fp_bBlankField=False
| Set fp_dictInputs =
Server.CreateObject("Scripting.Dictionary")
| Set fp_dictParams =
Server.CreateObject("Scripting.Dictionary")
| Set fp_dictColTypes =
Server.CreateObject("Scripting.Dictionary")
| fp_iParam = 1
|
| fp_sQry = FP_ReplaceQuoteChars(fp_sQry)
|
| ' replace any input parameters in query string
| ' there need to be at least 5 more characters in the string
for
there
to be
| input parameters (::[_a-z]::)
| Do While (Not fp_fError) And (fp_iCurrent + 5 < Len(fp_sQry)
And
| Instr(fp_iCurrent, fp_sQry, "::") > 0)
| fp_iMax = Len(fp_sQry) + 1
| fp_iColonStart = Instr(fp_iCurrent, fp_sQry, "::")
| fp_iSQuoteStart = Instr(fp_iCurrent, fp_sQry, "'")
| fp_iDQuoteStart = Instr(fp_iCurrent, fp_sQry, """")
|
| If (fp_iSQuoteStart = 0) then
| fp_iSQuoteStart = fp_iMax
| End If
| If (fp_iDQuoteStart = 0) then
| fp_iDQuoteStart = fp_iMax
| End If
|
| fp_sQuoteDelim = ""
| fp_iQuoteStart = -1
| fp_iQuoteEnd = fp_iMax
| fp_bQuoteFound = false
| If (fp_iColonStart > fp_iSQuoteStart and fp_iDQuoteStart >
fp_iSQuoteStart)
| then 'single quote is first sought for character
| fp_sQuoteDelim = "'"
| fp_iQuoteStart = fp_iSQuoteStart
| elseIf (fp_iColonStart > fp_iDQuoteStart and fp_iSQuoteStart >
| fp_iDQuoteStart) then 'double quote is first sought for
character
| fp_sQuoteDelim = """"
| fp_iQuoteStart = fp_iDQuoteStart
| else
| 'The :: comes before any ' or "
| End If
|
| If(fp_sQuoteDelim <> "") then
| fp_iPotQuoteEnd = fp_iQuoteStart + 1
| Do While (fp_bQuoteFound = false and fp_iPotQuoteEnd <
fp_iMax)
| fp_iPotQuoteEnd = Instr(fp_iPotQuoteEnd, fp_sQry,
fp_sQuoteDelim)
|
| If(fp_iPotQuoteEnd = 0) then
| exit do
| End If
|
| If(fp_iPotQuoteEnd = fp_iMax - 1) then
| fp_iQuoteEnd = fp_iPotQuoteEnd
| fp_bQuoteFound = true
| exit do
| End If
|
| If(Mid(fp_sQry, fp_iPotQuoteEnd + 1, 1) <> fp_sQuoteDelim)
then
| fp_iQuoteEnd = fp_iPotQuoteEnd
| fp_bQuoteFound = true
| else
| fp_iPotQuoteEnd = fp_iPotQuoteEnd + 2
| End If
| Loop
|
| If(fp_bQuoteFound = false) then
| Err.Description = "Unable to find a matching quote for " &
fp_sQuoteDelim
| & " in the query."
| fp_fError = true
| fp_bSkip = true
| End If
|
| If(fp_iColonStart > fp_iQuoteEnd) then 'there is no user input
in
this
| literal string
| fp_iCurrent = fp_iQuoteEnd + 1
| fp_bSkip = true
| End If
|
| else
| fp_iQuoteStart = fp_iColonStart
| fp_bQuoteFound = false
| End If
|
| If not fp_bSkip then
| fp_iStart = fp_iColonStart
| ' found a opening ::, find the close ::
| fp_iEnd = InStr(fp_iStart + 2, fp_sQry, "::")
|
| If not fp_bQuoteFound then
| fp_iQuoteEnd = fp_iEnd + 1
| End If
| If fp_iEnd = 0 Then
| fp_fError = True
| Response.Write "<B>Database Results Error: mismatched
parameter
| delimiters</B>"
| Else
| fp_sField = Mid(fp_sQry, fp_iStart + 2, fp_iEnd - fp_iStart -
2)
| fp_sValue = Request.Form(fp_sField)
| if len(fp_sValue) = 0 then fp_sValue =
Request.QueryString(fp_sField)
|
| ' if the named form field doesn't exist, make a note of it
| If (len(fp_sValue) = 0) Then
| fp_iStartField = InStr(fp_sDefault, fp_sField & "=")
| if fp_iStartField > 0 then
| fp_iStartField = fp_iStartField + len(fp_sField) + 1
| fp_iEndField = InStr(fp_iStartField,fp_sDefault,"&")
| if fp_iEndField > 0 then
| fp_sValue = Mid(fp_sDefault,fp_iStartField,fp_iEndField -
| fp_iStartField)
| else
| fp_sValue = Mid(fp_sDefault,fp_iStartField)
| end if
| end if
 
Yes it just popped up after that change.

Thanks for the effort. I'm going to try it in access and see if
spiderwebwomans fix works in access.

David Berry said:
Sorry, I'm losing track of all the threads. So just adding the Formatting
causes the Type mismatch: 'FP_SetLocaleForPage' error? This is why I hate
the FP database wizard.


--
David Berry
FrontPage Support: http://www.frontpagemvps.com/



Daytona Steve said:
I tried it, see my third post, 5th in the string on March 19. That's when
I
producted my first error.

David Berry said:
Type mismatch usually means you've got a string when it should be an
integer
(or date etc) or vice versa. I'm not sure what this error means since I
don't use the FP DRW. If the original page
(http://www.bdmcdaytona.com/testcbas/listings.asp ) is working then why
not
just use that one and fix the currency format using the sample code I
gave
you before?

SELECT Description, Office, Bedroom, Bathrooms, Agent,
Format(Price,'$#,##0.00') as PriceField FROM .........

Then where it says:

<%=FP_FieldVal(fp_rs,"Price")%>

You'd make that"

<%=FP_FieldVal(fp_rs,"PriceField")%>

(the select should be all on one line)

--
David Berry
FrontPage Support: http://www.frontpagemvps.com/



Sorry, getting confused, don't know how you guys keep it straight...

The answer to his question was yes, the code was there and the error on
the
page is:

Microsoft VBScript runtime error '800a000d'
Type mismatch: 'FP_SetLocaleForPage'

/testcbas/_fpclass/fpdbrgn1.inc, line 3

I beleive it is the same error as before.

The page is:

http://www.bdmcdaytona.com/testcbas/listingsv2.asp

This is my test page for this exercise and the page I've used for all
of
the
changes. It is also where the code resides that I have posted.

The original page, which Stafan referenced was
http://www.bdmcdaytona.com/testcbas/listings.asp which hasn't changed
and
is
working fine except for the currancy format.



:

What error / problem are you getting now? You didn't say in your reply
to
Stefan

--
David Berry
FrontPage Support: http://www.frontpagemvps.com/



message
I'm sorry to report it did not. Perhaps I should switch to Access?
(great,
a new software that I don't know how to use).

:

So did that solve the problem?

--
David Berry
FrontPage Support: http://www.frontpagemvps.com/



message
Thank you. I'm actually experimeting on listingsv2.asp but this
code
is
in
the head

<head>
<% ' FP_ASP -- ASP Automatically generated by a Frontpage
Component.
Do
not
Edit.
FP_LCID = 1033 %>
<meta http-equiv="Content-Language" content="en-us">
<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>Coldwell Banker All Stars Listings</title>
</head>


:

Make sure in http://www.bdmcdaytona.com/testcbas/listings.asp
you
have
in
the Head section

<%
' FP_ASP -- ASP Automatically generated by a Frontpage
Component.
Do
not
Edit.
FP_LCID=1033
%>

FP_LCID=1033
must be on a line by itself
--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


in
message
| OK, I searched the text and did not find LOCID. When I opened
this
file, the
| third line already had a single quote,
|
| Here is the text of the file:
|
| <%
|
| FP_SetLocaleForPage
|
| ' determine whether or not to provide navigation controls
| if fp_iPageSize > 0 then
| fp_fShowNavbar = True
| else
| fp_fShowNavbar = False
| end if
|
| fp_sPagePath = Request.ServerVariables("PATH_INFO")
| fp_sEnvKey = fp_sPagePath & "#fpdbr_" & fp_iRegion
| fp_sFormName = "fpdbr_" & CStr(fp_iRegion)
| fp_sFormKey = fp_sFormName & "_PagingMove"
|
| fp_sInputs = fp_sDefault
|
| fp_DEBUG = False
|
| fp_sFirstLabel = " |< "
| fp_sPrevLabel = " < "
| fp_sNextLabel = " > "
| fp_sLastLabel = " >| "
| fp_sDashLabel = " -- "
|
| if not IsEmpty(Request(fp_sFormKey)) then
| fp_sMoveType = Request(fp_sFormKey)
| else
| fp_sMoveType = ""
| end if
|
| fp_iCurrent=1
| fp_fError=False
| fp_bBlankField=False
| Set fp_dictInputs =
Server.CreateObject("Scripting.Dictionary")
| Set fp_dictParams =
Server.CreateObject("Scripting.Dictionary")
| Set fp_dictColTypes =
Server.CreateObject("Scripting.Dictionary")
| fp_iParam = 1
|
| fp_sQry = FP_ReplaceQuoteChars(fp_sQry)
|
| ' replace any input parameters in query string
| ' there need to be at least 5 more characters in the string
for
there
to be
| input parameters (::[_a-z]::)
| Do While (Not fp_fError) And (fp_iCurrent + 5 < Len(fp_sQry)
And
| Instr(fp_iCurrent, fp_sQry, "::") > 0)
| fp_iMax = Len(fp_sQry) + 1
| fp_iColonStart = Instr(fp_iCurrent, fp_sQry, "::")
| fp_iSQuoteStart = Instr(fp_iCurrent, fp_sQry, "'")
| fp_iDQuoteStart = Instr(fp_iCurrent, fp_sQry, """")
|
| If (fp_iSQuoteStart = 0) then
| fp_iSQuoteStart = fp_iMax
| End If
| If (fp_iDQuoteStart = 0) then
| fp_iDQuoteStart = fp_iMax
| End If
|
| fp_sQuoteDelim = ""
| fp_iQuoteStart = -1
| fp_iQuoteEnd = fp_iMax
| fp_bQuoteFound = false
| If (fp_iColonStart > fp_iSQuoteStart and fp_iDQuoteStart >
fp_iSQuoteStart)
| then 'single quote is first sought for character
| fp_sQuoteDelim = "'"
| fp_iQuoteStart = fp_iSQuoteStart
| elseIf (fp_iColonStart > fp_iDQuoteStart and fp_iSQuoteStart >
| fp_iDQuoteStart) then 'double quote is first sought for
character
| fp_sQuoteDelim = """"
| fp_iQuoteStart = fp_iDQuoteStart
| else
| 'The :: comes before any ' or "
| End If
|
| If(fp_sQuoteDelim <> "") then
| fp_iPotQuoteEnd = fp_iQuoteStart + 1
| Do While (fp_bQuoteFound = false and fp_iPotQuoteEnd <
fp_iMax)
| fp_iPotQuoteEnd = Instr(fp_iPotQuoteEnd, fp_sQry,
fp_sQuoteDelim)
|
| If(fp_iPotQuoteEnd = 0) then
| exit do
| End If
|
| If(fp_iPotQuoteEnd = fp_iMax - 1) then
| fp_iQuoteEnd = fp_iPotQuoteEnd
| fp_bQuoteFound = true
| exit do
| End If
|
| If(Mid(fp_sQry, fp_iPotQuoteEnd + 1, 1) <> fp_sQuoteDelim)
then
| fp_iQuoteEnd = fp_iPotQuoteEnd
| fp_bQuoteFound = true
| else
| fp_iPotQuoteEnd = fp_iPotQuoteEnd + 2
| End If
| Loop
|
| If(fp_bQuoteFound = false) then
| Err.Description = "Unable to find a matching quote for " &
fp_sQuoteDelim
| & " in the query."
| fp_fError = true
| fp_bSkip = true
| End If
|
| If(fp_iColonStart > fp_iQuoteEnd) then 'there is no user input
in
this
 
Back
Top