I finally figured it out after about 30 minutes:

<cfset todaydate = #createodbcdatetime("12/10/2001")#>

<cfquery name="getpo" datasource="MOM">
select ponumber, supplier, odr_date
from purchase
where odr_date = #todaydate#
</cfquery>

IT works.

At 10:34 AM 12/14/2001 -0500, you wrote:
>Just a stab in the dark, is that the query you are actually running? The
>double quotes before the date are actually a pair of single quotes.
>
>I have no experience with FoxPro, but the query you posted will not run
>under SQL Server. Change the single quotes to read like this and you should
>be alright:
>
>WHERE odr_date > '12/10/01'
>
>Mike
>
>
>-----Original Message-----
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, December 13, 2001 4:35 PM
>To: CF-Talk
>Subject: Querying FoxPro Date
>
>
>How can you select records for a FoxPro date by using date?
>
>The query:
>
><cfquery name="getpo" datasource="PO">
>select ponumber, supplier,odr_date
>from purchase
>where odr_date > ''12/10/01"
></cfquery>
>
>
>It returns with the error:
>
>ODBC Error Code = 22005 (Error in assignment)
>[Microsoft][ODBC Visual FoxPro Driver]Operator/operand type mismatch.
>
>In SQL, it works fine. But the DB will be in FoxPro
>
>When I select all and out the date, the date format is in yyyy-mm-dd.  I
>tried using that format, but no luch either.
>
>Any clues?
>
>Thanks
>Jacob
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to