It definitely SHOULD be if its default has been set. ..:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com
-----Original Message----- From: Rick Faircloth [mailto:[EMAIL PROTECTED] Sent: Thursday, February 09, 2006 11:12 PM To: CF-Talk Subject: RE: What's wrong with this? Well, Bobby, your suggestion worked... I changed the line to: DateTime = #CreateODBCDateTime(Now())# and it worked fine... But I thought a TimeStamp field in MySQL was automatically updated without having to be referenced in the update query? Thanks! Rick > -----Original Message----- > From: Bobby Hartsfield [mailto:[EMAIL PROTECTED] > Sent: Thursday, February 09, 2006 10:48 PM > To: CF-Talk > Subject: RE: What's wrong with this? > > > DateTime is a datatype in Access and reserved in Access... Don't > know about > MySQL (it's probably fine.. just worth checking into) > > I'd actually lose the cfqueryparam and just make it > createodbcdatetime(now()). It's always taken care of formatting the > date/time like it needs to be for me and whatever date/time type the > database is using. > > Also, MySQL has MANY date functions. You could use those as well if the > above doesnt work for you. > > Does 'set datetime = CURRENT_TIMESTAMP()' work?? I dont guess I've ever > even TRIED to use those functions in an UPDATE query. > > http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html > > Good luck! > > ..:.:.:.:.:.:.:.:.:.:.:.:. > Bobby Hartsfield > http://acoderslife.com > > > > > > -----Original Message----- > From: Rick Faircloth [mailto:[EMAIL PROTECTED] > Sent: Thursday, February 09, 2006 9:18 PM > To: CF-Talk > Subject: RE: What's wrong with this? > > I tried taking off the CreateODBCDateTime part earlier...still > got the same error message. > > I was a little struck by the fact that the TimeStamp field isn't > updating without any reference in the update query...usually > it does. The default is set to "CURRENT_TIMESTAMP"...that's > the default setting it inserted automatically when the field was > created. > > But since the TimeStamp field wasn't updating to the current time, > I thought I'd try to force it... > > If I remove that line from the query, I don't get an error, but don't > get an updated datetime, either.... > > ? > > Rick > > > -----Original Message----- > > From: Aaron Rouse [mailto:[EMAIL PROTECTED] > > Sent: Thursday, February 09, 2006 9:03 PM > > To: CF-Talk > > Subject: Re: What's wrong with this? > > > > > > I never have worked with MySQL but I know with other databases I > > would strip > > off the CreateODBCDateTime() and it works fine. Does MySQL not have a > > function for the system date/time? I usually make that the > default value > > for any timestamps and then if updating to it I just set to the > function. > > > > On 2/9/06, Rick Faircloth <[EMAIL PROTECTED]> wrote: > > > > > > DateTime=<cfqueryparam cfsqltype="CF_SQL_TIMESTAMP" > > > Value="#CreateODBCDateTime(Now())#"> > > > > > > I'm getting a data conversion error...the MySQL DB field is > > > a timestamp field and > > > this line is from an update query... > > > > > > Rick > > > > > > > > > > > > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231900 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

