Ack! Don't use cfupdate as a solution to this problem. Dates in oracle
really aren't that hard. There's a number of ways you can do them. The
easiest solution for entering the current date/time (as someone mentioned)
is to let Oracle do it with sysdate. So, your query would be:
UPDATE BookInventory
SET Status = 'Checked Out',
CheckedTo = 'rayb',
ChgDate = sysdate
WHERE id = 2043
If you want to control the date/time, then do it like this:
UPDATE BookInventory
SET Status = 'Checked Out',
CheckedTo = 'rayb',
ChgDate = to_date('2003-09-16 16:08:22', 'yyyy-mm-dd hh24:mi:ss')
WHERE id = 2043
Or, if you want CF to handle it "automagically" it would go like this:
UPDATE BookInventory
SET Status = 'Checked Out',
CheckedTo = 'rayb',
ChgDate = <cfqueryparam cfsqltype="CF_SQL_TIMESTAMP" value="2003-09-16
16:08:22">
WHERE id = 2043
----- Original Message -----
From: "Peter Tilbrook" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, September 17, 2003 9:29 AM
Subject: RE: Date problem with CFMX and Oracle
> Ah, Oracle - you have to love it! More and more corporations it seems are
> using this DBMS!
>
> For good reason - it is very capable.
>
> From a development point of view, especially with a frequently absent
> database administrator in between, it can be a nightmare.
>
> Why you are using this:
>
> ChgDate = {ts '2003-09-16 16:08:22'}
>
> Instead of a native ColdFusion function like CreateODBCDateTime(Now()) or
> something is beyond me.
>
> Your quotes could also be an issue, try double rather than single quotes.
> Also the CFUPDATE function negates the need for the SQL - just ensure the
> data going in is valid beforehand - eg:
>
> <cfupdate datasource="#Request.DataSourceName#" tablename="ACTCFUG_News"
>
formfields="NewsID,NewsTitle,NewsBody,NewsBodyTemp,NewsUpdated,NewsLocked,Ne
> wsReleased,NewsApproved,NewsCompleted" username="#Request.DataSourceUser#"
> password="#Request.DataSourcePassword#">
>
> The "formfields" are validated before going to the database - an error
could
> be trapped and handled by CFTRY or some other error handler.
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Get the mailserver that powers this list at
http://www.coolfusion.com