I have an interesting situation. Running a test page against the same
data (copied the database from remote server to local server on my dev
box), I am getting different results. Both CF servers are version 5
(Enterprise on my dev box, Pro on the hosted server) and the database is
MS Access 2000.
Server info (remote):
Server.ColdFusion.ProductName -- ColdFusion Server
Server.ColdFusion.ProductVersion -- 5, 0, 0, 0
Server.ColdFusion.ProductLevel -- Professional
Server.OS.Name -- Windows NT
Server.OS.AdditionalInformation -- Service Pack 3
Server.OS.Version -- 5.0
Server.OS.BuildNumber -- 2195
Server info (local):
Server.ColdFusion.ProductName -- ColdFusion Server
Server.ColdFusion.ProductVersion -- 5, 0, 0, 0
Server.ColdFusion.ProductLevel -- Enterprise
Server.OS.Name -- Windows NT
Server.OS.AdditionalInformation -- Service Pack 2
Server.OS.Version -- 5.0
Server.OS.BuildNumber -- 2195
The results I get against the test data are:
Local dev box:
11:00 AM - Filled
11:35 AM - Filled
12:10 PM - Filled
12:45 PM - Filled
01:20 PM - Filled
01:55 PM - Filled
02:30 PM - Filled
03:40 PM - Filled
send email, no open time slots
Remote server:
11:00 AM - Open
11:35 AM - Filled
12:10 PM - Filled
12:45 PM - Filled
01:20 PM - Filled
01:55 PM - Open
02:30 PM - Open
03:05 PM - Open
03:40 PM - Open
Open
And the code in the test template:
[begin code dump]
<cfset breaklength = "10">
<cfset sessionlength = "25">
<cfset openAppts = "False">
<cfset EventID = "43">
<cfquery name="GetEvents" datasource="#request.dsn#" dbtype="ODBC">
SELECT StartTime, StopTime
FROM Events
WHERE EventID = #eventID#
</cfquery>
<cfset steptime = getevents.starttime>
<!--- loop over appt times --->
<cfloop condition="DateCompare(StepTime, getevents.StopTime) LT 1">
<cfquery name="GetAppts" datasource="#request.dsn#">
SELECT ApptTime, ApptLength
FROM Reservations
WHERE EventID = #eventID# AND ApptTime = <cfqueryparam value="#steptime#" cfsqltype="CF_SQL_TIMESTAMP">
</cfquery>
<!--- if appttime not empty --->
<cfif GetAppts.RecordCount>
<cfoutput>#TimeFormat(stepTime)#</cfoutput> - Filled<br>
<!--- if apptlength equals sessionlength --->
<cfif getappts.apptlength EQ sessionlength>
<!--- increment steptime (session.breaklength + session.sessionlength --->
<cfset steptime = DateAdd("n", (breakLength + SessionLength), steptime)>
</cfif>
<!--- if apptlength gt sessionlength --->
<cfif getappts.apptlength GT sessionlength>
<cfset ApptEnd = DateAdd("n", (getappts.apptlength + breaklength), getappts.appttime)>
<cfloop condition="DateCompare(StepTime, ApptEnd) LT 0">
<!--- increment steptime (session.breaklength + session.sessionlength --->
<cfset steptime = DateAdd("n", (breakLength + SessionLength), steptime)>
</cfloop>
</cfif>
<!--- else, appt time slot is empty --->
<cfelse>
<!--- check to see if next appt time would extend beyond event stop time; if so, break out of loop and don't show time slot --->
<cfif getevents.StopTime LT DateAdd("n", sessionLength, steptime)>
<cfbreak>
<cfelse>
<cfset OpenAppts = "True">
<cfoutput>#TimeFormat(stepTime)#</cfoutput> - Open<br>
<!--- increment steptime --->
<cfset steptime = DateAdd("n", (breakLength + SessionLength), steptime)>
</cfif>
</cfif>
</cfloop>
<!--- end loop over appt times --->
<cfif OpenAppts>
Open
<cfelse>
send email, no open time slots
</cfif>
[end code dump]
Can anyone tell me why the results returned from executing the above
code would be different on the remote server vs my local box? This has
me scratching my head.
Thanks.
--
Chris Montgomery
Airtight Web Services http://www.airtightweb.com
Web Development, Web Project Management, Software Sales
210-490-2415
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

