Re: need help with updating date field

2007-05-30 Thread Claude Schneegans
>>CF casts datatypes when necessary in an expression. I don't see how this is any different from any other casting in CF. This is what I meant. http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: [EMAIL PROTECTED]) Thanks. ~~~

RE: need help with updating date field

2007-05-30 Thread Dave Watts
> This only shows that an ODBC dateTime stamp by default, not that Now() returns it. CFOUTPUT doesn't format anything. It outputs values of expressions. > If it was so, then Now() + 1 would cause an error, since one > cannot add a number to a string. > Try #Now()+1# > and you'll get a number,

Re: need help with updating date field

2007-05-30 Thread Claude Schneegans
>>It's often easier to use CFQUERYPARAM, actually - for example, you don't have to worry about single quotes. But if you want only a date, with no time, you still need to use CreateODBCDate () to format the date properly for CFQUERYPARAM, then it is is not that much easier. --

Re: need help with updating date field

2007-05-30 Thread Claude Schneegans
>>You can easily test this: >>#Now()# This only shows that #Now()+1# and you'll get a number, not an ODBC date. This is because Now() is known as a date object, thus may be formated as a date, but Now()+1 is just a number, and formated as such by CFOUTPUT. -- _

RE: need help with updating date field

2007-05-30 Thread Dave Watts
> Thanks all for the quick responses, I've changed the field > name from Date to AccessDate, makes more sense too. I used > cfqueryparam on my insert and just trying to get this thing > to work in the raw first ;). As for using jdbc instead of > odbc, I have yet to get cf to register the ds usi

RE: need help with updating date field

2007-05-30 Thread Dave Watts
> Are you sure of that? > Now () is supposed to return a date-time object which is a > foating point value, not an ODBC date. You can easily test this: #Now()# Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instructio

Re: need help with updating date field

2007-05-30 Thread Claude Schneegans
>>First, the Now function returns an ODBC timestamp Are you sure of that? Now () is supposed to return a date-time object which is a foating point value, not an ODBC date. But it is possible that it will be automatically converted to an ODBCDate by the CFQUERY tag. And if it does so, then it is

Re: need help with updating date field

2007-05-30 Thread Bob Imperial
Thanks all for the quick responses, I've changed the field name from Date to AccessDate, makes more sense too. I used cfqueryparam on my insert and just trying to get this thing to work in the raw first ;). As for using jdbc instead of odbc, I have yet to get cf to register the ds using the SQL

RE: need help with updating date field

2007-05-30 Thread Peterson, Chris
:48 PM To: CF-Talk Subject: RE: need help with updating date field Wow... that was just one messed up query I guess heh. I stopped with the first error I saw... so to recap class... UPDATE AdminPersonnel SET First_Name = '#form.First_Name#',

Re: need help with updating date field

2007-05-30 Thread Ken Sykora
> > ..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:. > Bobby Hartsfield > http://acoderslife.com > > > -Original Message- > From: Charlie Griefer [mailto:[EMAIL PROTECTED] > Sent: Wednesday, May 30, 2007 12:28 PM > To: CF-Talk > Subject: Re: n

RE: need help with updating date field

2007-05-30 Thread Bobby Hartsfield
-- DON'T FORGET TO CHANGE ALL THOSE TO CFQUERYPARAMS! --- ..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -Original Message- From: Charlie Griefer [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 30, 2007 12:

Re: need help with updating date field

2007-05-30 Thread Charlie Griefer
first off, DATE is a reserved word and probably shouldn't be used as a column name. if you can't change it, at least enclose it in brackets ([DATE]) in your SQL, remove the single quotes from the #createODBCDate(now())# value. also, look into using (hey if i didn't say it, somebody else would h

Re: need help with updating date field

2007-05-30 Thread Charlie Griefer
CTED] > Sent: May 30, 2007 12:21 PM > To: CF-Talk > Subject: need help with updating date field > > I know this is probably obvious to most of you here, but I have an error > on an update statement that I need some enlightenment on please. I'm > using MSSQL2k, CFMX7 and I

RE: need help with updating date field

2007-05-30 Thread Dave Watts
> I know this is probably obvious to most of you here, but I > have an error on an update statement that I need some > enlightenment on please. I'm using MSSQL2k, CFMX7 and I have > an insert statement that works fine using > "#createODBCdate(Now())#" but my update bombs on it?? First, the Now

RE: need help with updating date field

2007-05-30 Thread Will Swain
I think it should be: Date = #createODBCdate(Now())#, HTH Will -Original Message- From: Imperial, Robert [mailto:[EMAIL PROTECTED] Sent: 30 May 2007 17:21 To: CF-Talk Subject: need help with updating date field I know this is probably obvious to most of you here, but I have an error

RE: need help with updating date field

2007-05-30 Thread Andy McShane
You are missing a comma after Fax = '#form.Fax#' Should read Fax = '#form.Fax#', -Original Message- From: Imperial, Robert [mailto:[EMAIL PROTECTED] Sent: 30 May 2007 17:21 To: CF-Talk Subject: need help with updating date field I know this is probably obvious to m

RE: need help with updating date field

2007-05-30 Thread Marius Milosav
You are missing a comma after '#form.Fax#' Marius Milosav ScorpioSoft Corp. www.scorpiosoft.com -Original Message- From: Imperial, Robert [mailto:[EMAIL PROTECTED] Sent: May 30, 2007 12:21 PM To: CF-Talk Subject: need help with updating date field I know this is probably

Re: need help with updating date field

2007-05-30 Thread Claude Schneegans
>>Date = '#createODBCdate(Now())#' Tow things here: first a date value needs no quotes in SQL, then use this instead: Date = #createODBCdate(Now())# Secondly, "Date" is a reserved word in several db systems, it would be a good idea to use another field name. -- _

RE: need help with updating date field

2007-05-30 Thread Steve Milburn
Sent: Wednesday, May 30, 2007 12:21 PM To: CF-Talk Subject: need help with updating date field I know this is probably obvious to most of you here, but I have an error on an update statement that I need some enlightenment on please. I'm using MSSQL2k, CFMX7 and I have an insert statem

RE: need help with updating date field

2007-05-30 Thread Bobby Hartsfield
Remove the single quotes around #createODBCDate(Now())# ..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -Original Message- From: Imperial, Robert [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 30, 2007 12:21 PM To: CF-Talk Subject: need help with updating

need help with updating date field

2007-05-30 Thread Imperial, Robert
I know this is probably obvious to most of you here, but I have an error on an update statement that I need some enlightenment on please. I'm using MSSQL2k, CFMX7 and I have an insert statement that works fine using "#createODBCdate(Now())#" but my update bombs on it?? Here's my update: