David,
many thanks for your interest.
Your clarifications are correct.
The query is from the embedded Access file that the asp page accesses. (in
an Access database called masonic)
If the issue is one of passing data to the sql, it is a fault that also
occurs when you use FP only code. (I have tried removing all my code and
just
using the FP wizard, same problem)
Remember this code does work on earlier versions of IIS.
Paul
The page is here:
http://www.derbyshiremason.org/newpglroot/masonicConcepts/calendar.asp
and this is the entire HTML as FP sees it.
<html>
<head>
<% ' FP_ASP -- ASP Automatically generated by a FrontPage Component. Do
not
Edit.
FP_LCID = 2057 %>
<meta http-equiv="Content-Language" content="en-gb">
<% ' 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>Calendar</title>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta name="Microsoft Theme" content="pgl 0011, default">
<meta name="Microsoft Border" content="tlrb, default">
</head>
<body>
<SCRIPT LANGUAGE=vbscript>
<!--
Sub Calendar1_Click()
'set the locale to UK english
Dim meetingdate
Dim original
original = setlocale("en-gb")
meetingdate=calendar1.value
window.navigate("calendar.asp?meetingdate="&meetingdate)End Sub
-->
</SCRIPT>
<div align="center">
<table border="0" cellspacing="1" style="border-collapse: collapse;
text-align: center" width="74%">
<tr>
<td width="115%"><i><b><font color="#800000"
size="2">Help:</font></b></i><font color="#000080" size="2"><br>
Choose the month, then the year, then
the date to find Derbyshire lodges meeting at that time.</font></td>
<td width="109%">
<object classid="clsid:8E27C92B-1264-101C-8A2F-040224009C02"
id="Calendar1"
width="361" height="161">
<param name="_Version" value="524288">
<param name="_ExtentX" value="7641">
<param name="_ExtentY" value="3408">
<param name="_StockProps" value="1">
<param name="BackColor" value="-2147483633">
<param name="Year" value=year(now())>
<param name="Month" value=month(now())>
<param name="Day" value=day(now())>
<param name="DayLength" value="1">
<param name="MonthLength" value="1">
<param name="DayFontColor" value="0">
<param name="FirstDay" value="7">
<param name="GridCellEffect" value="1">
<param name="GridFontColor" value="10485760">
<param name="GridLinesColor" value="-2147483632">
<param name="ShowDateSelectors" value="-1">
<param name="ShowDays" value="-1">
<param name="ShowHorizontalGrid" value="-1">
<param name="ShowTitle" value="-1">
<param name="ShowVerticalGrid" value="-1">
<param name="TitleFontColor" value="10485760">
<param name="ValueIsNull" value="0">
</object>
</td>
</tr>
</table><table width="100%" border="1">
<thead>
<tr>
<th ALIGN="LEFT"><b>LodgeName</b></th>
<th ALIGN="LEFT"><b>LNo</b></th>
<th ALIGN="LEFT"><b>Meetingdate</b></th>
<th ALIGN="LEFT"><b>meetingtype</b></th>
<th ALIGN="LEFT"><b>lodgetype</b></th>
</tr>
</thead>
<tbody>
<!--webbot bot="DatabaseRegionStart"
s-columnnames="LodgeName,LNo,lodgetype,meetingtype,Expr1,Meetingdate,month,Expr2,Expr3,LodgeID,hallid,Expr4,Expr5,Expr6"
s-columntypes="202,3,202,202,135,135,3,2,2,3,3,135,135,135"
s-dataconnection="masonic" b-tableformat="TRUE" b-menuformat="FALSE"
s-menuchoice s-menuvalue b-tableborder="TRUE" b-tableexpand="TRUE"
b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE"
i-listformat="0" b-makeform="FALSE" s-recordsource="meetings"
s-displaycolumns="LodgeName,LNo,Meetingdate,meetingtype,lodgetype"
s-criteria="[Meetingdate] EQ {Meetingdate} +" s-order="[LNo] +"
s-sql="SELECT
* FROM meetings WHERE (Meetingdate = '::Meetingdate::') ORDER BY LNo ASC"
b-procedure="FALSE" clientside suggestedext="asp"
s-defaultfields="Meetingdate=10/10/07" s-norecordsfound="Choose meeting
date
from calendar" i-maxrecords="256" i-groupsize="0" botid="0"
u-dblib="../_fpclass/fpdblib.inc" u-dbrgn1="../_fpclass/fpdbrgn1.inc"
u-dbrgn2="../_fpclass/fpdbrgn2.inc" tag="TBODY" preview="<tr><td
colspan=64
bgcolor="#FFFF00" 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>" 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 meetings WHERE (Meetingdate = '::Meetingdate::')
ORDER BY LNo ASC"
fp_sDefault="Meetingdate=10/10/07"
fp_sNoRecords="<tr><td colspan=5 align=""LEFT"" width=""100%"">Choose
meeting date from calendar</td></tr>"
fp_sDataConn="masonic"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&LodgeName=202&LNo=3&lodgetype=202&meetingtype=202&Expr1=135&Meetingdate=135&month=3&Expr2=2&Expr3=2&LodgeID=3&hallid=3&Expr4=135&Expr5=135&Expr6=135&"
fp_iDisplayCols=5
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="28515" --><tr>
<td>
<!--webbot bot="DatabaseResultColumn"
s-columnnames="LodgeName,LNo,lodgetype,meetingtype,Expr1,Meetingdate,month,Expr2,Expr3,LodgeID,hallid,Expr4,Expr5,Expr6"
s-column="LodgeName" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE" clientside b-MenuFormat preview="<font
size="-1"><<</font>LodgeName<font size="-1">>></font>"
startspan
--><%=FP_FieldVal(fp_rs,"LodgeName")%><!--webbot
bot="DatabaseResultColumn"
endspan i-checksum="19766" --></td>
<td>
<!--webbot bot="DatabaseResultColumn"
s-columnnames="LodgeName,LNo,lodgetype,meetingtype,Expr1,Meetingdate,month,Expr2,Expr3,LodgeID,hallid,Expr4,Expr5,Expr6"
s-column="LNo" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
clientside b-MenuFormat preview="<font size="-1"><<</font>LNo<font
size="-1">>></font>" startspan
--><%=FP_FieldVal(fp_rs,"LNo")%><!--webbot bot="DatabaseResultColumn"
endspan
i-checksum="65156" --></td>
<td>
<!--webbot bot="DatabaseResultColumn"
s-columnnames="LodgeName,LNo,lodgetype,meetingtype,Expr1,Meetingdate,month,Expr2,Expr3,LodgeID,hallid,Expr4,Expr5,Expr6"
s-column="Meetingdate" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE" clientside b-MenuFormat preview="<font
size="-1"><<</font>Meetingdate<font size="-1">>></font>"
startspan --><%=FP_FieldVal(fp_rs,"Meetingdate")%><!--webbot
bot="DatabaseResultColumn" endspan i-checksum="30155" --></td>
<td>
<!--webbot bot="DatabaseResultColumn"
s-columnnames="LodgeName,LNo,lodgetype,meetingtype,Expr1,Meetingdate,month,Expr2,Expr3,LodgeID,hallid,Expr4,Expr5,Expr6"
s-column="meetingtype" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE" clientside b-MenuFormat preview="<font
size="-1"><<</font>meetingtype<font size="-1">>></font>"
startspan --><%=FP_FieldVal(fp_rs,"meetingtype")%><!--webbot
bot="DatabaseResultColumn" endspan i-checksum="33739" --></td>
<td>
<!--webbot bot="DatabaseResultColumn"
s-columnnames="LodgeName,LNo,lodgetype,meetingtype,Expr1,Meetingdate,month,Expr2,Expr3,LodgeID,hallid,Expr4,Expr5,Expr6"
s-column="lodgetype" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE" clientside b-MenuFormat preview="<font
size="-1"><<</font>lodgetype<font size="-1">>></font>"
startspan
--><%=FP_FieldVal(fp_rs,"lodgetype")%><!--webbot
bot="DatabaseResultColumn"
endspan i-checksum="22598" --></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"
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="56926" --></tbody>
</table>
</div>
<br>
</body>
</html>
David Berry said:
Paul, just to clarify, when you're trying to return the results on your
page
you said the SQL Statement was:
SELECT * FROM meetings WHERE (Meetingdate = #::Meetingdate::#) ORDER BY
LNo
ASC
Is Meetingdate the field that holds the date information? What is the
Access query below used for (how are you using it on your page)?
When a user picks a date on the calendar, how is that being done (what's
the
code). For example, they pick a date, it has a value and when clicked
that
value is being stored in a variable called "Meetingdate" that is then
used
in the SQL Statement above right?
Can you show us all the code for the page? I'm thinking there's an issue
between what's getting picked from the calendar and what's passed to the
SQL
Statement.
David,
I have tried with and without the setlocal statement and have set to US
and
GB. All give the same result.
If I use the FP generated search form, I get the same problem. i.e. I
only
use FP generated code, none of my own.
Meetingdate is a field in the database. You can also see this field
displayed on the form.
The date is derived from this expression within an access query:
Expr1:
DateSerial(Year(Now()),[month],meetingdate!offset+(Lodges!weekinmonth)*7+Lodges!dayofweek-Weekday(DateSerial(Year(Now()),[month],1)-1)-IIf(Weekday(DateSerial(Year(Now()),[month],1)-1)>[dayofweek],0,7))
Paul
:
In your code you have:
'set the locale to UK English
Dim meetingdate