As far as with is better.... Not sure. Personally, I never use
CreateODBCDate() or CreateODBCDateTime(). If your database supports
CFQueryParam tag, I would recommend that one. It has several advantages
in terms of query performance.
Ex.
I would do
WHERE
date_created = <cfqueryparam value="#Now()#"
cfsqltype="CF_SQL_TIMESTAMP" />
.... Instead of ...
WHERE
date_created = #CreateODBCDateTime( Now() )#
In fact, if you are using "Now()", you wouldn't even need the
CreateODBCDateTime() method call as Now() is already ODBC time stamp.
If you want to know about speed and Cfqueryparam... Here is a good post:
http://www.harelmalka.com/?m=200608
......................
Ben Nadel
Certified Advanced ColdFusion Developer
www.bennadel.com
-----Original Message-----
From: Michael E. Carluen [mailto:[EMAIL PROTECTED]
Sent: Friday, September 22, 2006 5:24 PM
To: CF-Talk
Subject: RE: Best use for createODBCdate(), cfqueryparam CF_SQL_DATE vs.
CF_SQL_TIMESTAMP
Thanks Ben. I've been using both createOBDC... and cfqueryparam... on
mySQL/JDBC and have not encountered a problem- which actually lead to
this thread. If both are OK, then which is better. Thanks for
mentioning your experience with MSSQL, as I'm sure it's a consideration
when writing modular apps.
> -----Original Message-----
> From: Ben Nadel [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 22, 2006 2:02 PM
> To: CF-Talk
> Subject: RE: Best use for createODBCdate(), cfqueryparam CF_SQL_DATE
vs.
> CF_SQL_TIMESTAMP
>
> PS.
>
> Here is where you can see what DB's support which CF_SQL_XXXX
>
> http://livedocs.macromedia.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/co
> mm
> on/html/wwhelp.htm?context=ColdFusion_Documentation&file=00000317.htm
>
> ......................
> Ben Nadel
> Certified Advanced ColdFusion Developer www.bennadel.com
>
>
> -----Original Message-----
> From: Michael E. Carluen [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 22, 2006 4:52 PM
> To: CF-Talk
> Subject: Best use for createODBCdate(), cfqueryparam CF_SQL_DATE vs.
> CF_SQL_TIMESTAMP
>
> I was wondering if someone can point out the main differences
> (advantages/disadvantages of each) between #createODBCdate()#,
> <cfqueryparam cfsqltype="CF_SQL_DATE"., and <cfqueryparam
> cfsqltype="CF_SQL_TIMESTAMP".
> when used on inserts and updates. Thanks in advance.
>
>
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four
times a year.
http://www.fusionauthority.com/quarterly
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:253931
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4