Maybe try using a cfqueryparam:

<cfqueryparam 
        value="#dateformat(FORM.start_date, "MM/DD/YYYY")#" 
        cfsqltype="cf_sql_date" 
        />


......................
Ben Nadel
Certified Advanced ColdFusion MX7 Developer
www.bennadel.com
 
Need ColdFusion Help?
www.bennadel.com/ask-ben/

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

Sent: Thursday, November 15, 2007 3:33 PM
To: CF-Talk
Subject: CF date values in Access

Shouldn't this be working? I'm more familiar with SQL Server 2000.

 <CFQUERY name="promomag" datasource="con_relations_magxml">
    SELECT     *
    FROM      tblPromotionParticipants 
    where promotionalID = 85 AND DateReceived >=
#dateformat(FORM.start_date, "MM/DD/YYYY")# 
    AND DateReceived <= #dateformat(FORM.end_date, "MM/DD/YYYY")#   
</CFQUERY>

Error Executing Database Query. 
[Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC
Microsoft Access Driver] Too few parameters. Expected 1. 
 
The error occurred in D:\Inetpub\wwwroot\SfConsumersdb\cds2.cfm: line 22

20 :     FROM      tblPromotionParticipants 
21 :     where promotionalID = 85 AND DateReceived >=
#dateformat(FORM.start_date, "MM/DD/YYYY")# 
22 :     AND DateReceived <= #dateformat(FORM.end_date, "MM/DD/YYYY")#

23 : </CFQUERY>
24 : 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Download the latest ColdFusion 8 utilities including Report Builder,
plug-ins for Eclipse and Dreamweaver updates.
http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293428
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to