Tried that one (I guess 1899-12-31 is a default of some sort), now I get:

Error Occurred While Processing Request
Error Executing Database Query.
[Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft
Access Driver] Too few parameters. Expected 1.

The error occurred in
C:\CFusionMX7\wwwroot\marylandPro\Reports\TheDailyFeed.cfm: line 20

18 : FROM TimeCard
19 : WHERE TimeCard.Associate = session.Associate AND timeCard.ReportDate =
20 : #createodbcDate (session.ReportDate)# and TimeCard.job =
#session.jobId#
21 : </cfquery>
22 :


----------------------------------------------------------------------------
----

SQL    SELECT Associate, Job, ReportDate, TotalHours FROM TimeCard WHERE
TimeCard.Associate = session.Associate AND timeCard.ReportDate = {d
'1899-12-31'} and TimeCard.job = 26
DATASOURCE   mdfinish
VENDORERRORCODE   -3010
SQLSTATE   07002

Please try the following:
Check the ColdFusion documentation to verify that you are using the correct
syntax.
Search the Knowledge Base to find a solution to your problem.


Browser   Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR
1.0.3705; .NET CLR 1.1.4322)
Remote Address   127.0.0.1
Referrer
Date/Time   14-Sep-05 07:28 PM



-----Original Message-----
From: Barney Boisvert [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 14, 2005 7:23 PM
To: CF-Talk
Subject: Re: date error


Remove the quotes from "session.reportDate".  You're passing a literal
string, not a variable reference.

cheers,
barneyb

On 9/14/05, Mark Fuqua <[EMAIL PROTECTED]> wrote:
> Hey there,
>
> Sorry for my ignorance.  Trying to test out <cfchart>.  Having trouble
with
> using a date in the where clause of my query.  I know I am more than
likely
> doing something really dumb and imagine the solution is quite simple.  So,
> before I spend more hours trying to figure this out...Thought I would ask
> for help.  Here is the code:
>
> <cfmodule template="#Request.layout#/Header.cfm" pageType="JobAdmin">
>
> <cfset session.reportdate = 1>
> <cfset session.associate = 23>
> <cfset session.reportDate eq '09/14/05'>
> <cfset session.jobId = 26>
> <cfquery name="test" datasource="mdfinish">
> SELECT Associate, Job, ReportDate, TotalHours
> FROM TimeCard
> WHERE TimeCard.Associate = session.Associate AND timeCard.ReportDate =
> #createodbcDate ("session.ReportDate")# and TimeCard.job = #session.jobId#
> </cfquery>
>
>
> <cfchart chartwidth="600">
>         <cfchartseries  type="bar">
>                 <cfchartdata item="Total Hours" value="#test.totalhours#">
>
>         </cfchartseries>
> </cfchart>
>
> <cfmodule template="#Request.layout#/Footer.cfm">
>
>
>
>
> Here is the error message:
>
> Parameter validation error for function CREATEODBCDATE.
> The value of the parameter 1, which is currently "session.ReportDate",
must
> be a class java.util.Date value.
>
> Thanks,
>
> Mark
>
>

--
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/

Got Gmail? I have 100 invites.



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:218343
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to