On 1/25/07, Tim Claremont <[EMAIL PROTECTED]> wrote:
> I have been doing this wrong for years and getting by with it. What is the 
> correct way?
>
> I have a field in my SQL Server 2005 PageHits table for the current date and 
> time. What data format should the field be? What value do I pass from CF? 
> CreateODBCDateTime(Now))???? I get an error when I try that!

why pass anything from CF?  why not just make the default value of the
field in the database getDate()?

if you're updating...just pass getDate() (just like that.  no quotes,
no # signs (it's a SQL Server function, not a CF function)).

no need to make CF do any thinking :)

-- 
Charlie Griefer

================================================
"...All the world shall be your enemy, Prince with a Thousand Enemies,
and whenever they catch you, they will kill you. But first they must catch
you, digger, listener, runner, prince with a swift warning.
Be cunning and full of tricks and your people shall never be destroyed."

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

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

Reply via email to