cfquery problem with insert.
Hello;
I'm having problems with my insert query for adding a new record. It's not throwing any errors, I dump all the variables from the from that feeds it and their there.. but it's not adding the record to the database. IT IS an access db, not my choice.. clients. Maybe that's the problem? (just kidding) Can someone help me figure out why this code won't add a new record. I'm posting my insert query, if you need more I can supply it. But i think it's a problem with this code.
<cfset EventDate = '#DateFormat(form.edit1,"mm/dd/yyyy")#'>
<cfquery result="yourResults" datasource="#APPLICATION.dataSource#" dbtype="ODBC">
INSERT INTO events
(title, eventDate, eventTime, location, contact, phone, fax, email, URL, sponsor, Body)
VALUES (<cfqueryparam cfsqltype="cf_sql_varchar" value="#form.title#">,
<cfqueryparam cfsqltype="cf_sql_date" value="#EventDate#">,
<cfqueryparam cfsqltype="cf_sql_time" value="#form.eventTime#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#form.location#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#form.contact#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#form.phone#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#form.fax#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#form.email#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#form.URL#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#form.sponsor#">,
<cfqueryparam cfsqltype="cf_sql_longvarchar" value="#form.PDSeditor#">)
</cfquery>
<cfquery name="qFetchID" datasource="#APPLICATION.dataSource#">
SELECT id
FROM events
WHERE title = '#form.title#'
</cfquery>
<cflocation url="events_RecordView.cfm?id=#qFetchID.id#">
It all looks right to me.. I even tried making it throw errors to maybe trip up the real problem and it's not working. Obviously.. I'm missing something.