I'm experimenting with a migration from ODBC to OLEDB --> access 2000

This query works fine with an ODBC datasource:
(STORYDT is a datetime field)

<CFQUERY NAME="getnews" Datasource="#application.mydsn#">
SELECT SREF, STORYSUBJ, STORYDT
FROM news
WHERE (STORYDT > #createodbcdatetime(dateadd("d",-7,now()))#)
</CFQUERY>

but with the OLEDB Datasource I get the error 
OLEDB Error Code - -524553244
Malformed GUID. in query expression '(STORYDT >
#createodbcdatetime(dateadd("d",-7,now()))#)'

So, thinks I, it must be something to do with the createodbcdatetime()
or dateadd() functions

but all these WHERE clauses generate the same error:
WHERE (STORYDT > #createodbcdatetime(now())#)
WHERE (STORYDT > {ts '2001-03-10 18:48:02'})
WHERE (STORYDT > '2001-03-10 18:48:02')
WHERE (STORYDT > #now()#)

This works - obviously passing a function to the DB itself, but not
exactly very flexible....
WHERE (STORYDT > now())

There must be a correct syntax - anyone help?

I really don't want to alter all my queries which involve time - is this
really necessary with OLEDB? 

This is weird! What's going on?

--
Regards;

Richard Meredith-Hardy
-------------------------------------------------------------
[EMAIL PROTECTED]
Tel: + 44 (0)1462 834776 FAX: + 44 (0)1462 732668

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to