well you'd have to change your form field name to event_date.  just be
careful as i've seen cfform misinterpret underscores in field names to
mean that it's a required field of type date.

actually you don't have to change the form field name (altho something
more descriptive like eventDate (without underscore) would probably be
preferrable if only for the sake of being a little more
self-documenting.

so let's try this:

1) rename your form field to eventDate
2) your column names are fine now, so just change your query to be:
INSERT INTO events (events, event_date) VALUES ('#form.events#',
'#form.eventDate#')

I didn't add the conditional logic above... you can handle that part.
My only other question would be the fact that you're using quotes
around the date values (and double quotes at that).  if your
event_date column is a date/time datatype, you shouldn't have (or
need) quotes around the value.  if it's not a date/time datatype... it
should be :)

On 4/18/07, Steve LaBadie <[EMAIL PROTECTED]> wrote:
> Changed Date to Event_Date and now I get "Element EVENT_DATE is undefined in 
> FORM"
>
> INSERT INTO Events (Events, Event_Date)
> VALUES (
> <cfif IsDefined("FORM.Events") AND #FORM.Event_Date# NEQ "">
> '#FORM.Events#', "#FORM.Event_Date#"
> <cfelse>
>
> ________________________________
>
> From: Wesley Middendorff [mailto:[EMAIL PROTECTED]
> Sent: Wed 4/18/2007 7:37 PM
> To: CF-Talk
> Subject: Re: Not Sure What is Wrong
>
>
>
> Keyword date, didnt even dawn on me, but that is the more likely answer.
>
> On 4/18/07, Charlie Griefer <[EMAIL PROTECTED]> wrote:
> >
> > 1) Date is a reserved word.  If you can't change it, enclose it in
> > square brackets.
> > 2) you have 2 columns specified (Events, Date) but in your <cfelse>
> > condition you're only inserting a single value.  You should have NULL,
> > NULL.
> >
>
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Macromedia ColdFusion MX7
Upgrade to MX7 & experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion?sdid=RVJW

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

Reply via email to