Kevin gets the prize... 8) Date is apparently some sort of reserved word. When I changed it to 'classdate', it worked fine as I show the code below.
The CreateODBCDateTime function was not needed. Access is good and bad in that respect. Unlike Oracle which is extremely finicky about how you feed it date information, Access is pretty loose, let's you enter in pretty much any date format. That's why it frustrated me about why this wasn't working this time, especially since it was code copied from another program. The only thing that changed (which should have been my big clue) was the column name. The other wierd thing about Access db use in CF is the funky triple-# usage. It took me a while to figure that one out. I think the reasoning is , the outer most pair cause CF to treat it as a variable (which it is), the next pair escapes the third pair so you end up with your date data going in with one single pair of # symbols around your date and time info. My $0.25 lesson is completed. Bruce ----- Original Message ----- From: "Kevin Miller" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Friday, February 01, 2002 11:14 AM Subject: Re: Access Db Query Date Syntax > Try changing the name of the form variable to something other than 'date.' > I think that is a reserved word. > > Kevin > > >>> [EMAIL PROTECTED] 02/01/02 11:06AM >>> > I have more trouble with trying to write INSERT and UPDATE querys for > an > Access Db. > I need help with what is wrong here. > > My insert query looks like this: > > <cfoutput> > <cfquery name="qInsertClass" datasource="abb"> INSERT INTO > Classes ( Status, Date, Class, ShortName, > Credit, Location, Description ) VALUES ( > '#FORM.Status#', ###Form.datepart# #Form.timepart###, > '#FORM.Class#', '#FORM.ShortName#', #FORM.Credit#, > '#Form.Location#', '#FORM.Description#' ) </cfquery> > </cfoutput> > The ONLY line that gives me problems is: > > ###Form.date###, > ______________________________________________________________________ Why Share? Dedicated Win 2000 Server � PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation � $99/Month � Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

