I have a form where a user has the option of plugging in a date, such as
01/15/2002. If they do enter in the date, the processing page posts it to
the Access db, no problem.
However, when the person chooses not to enter a date (it's optional), I
wrote the following CFParam statement to handle it:
<CFPARAM NAME="form.dateofsend" DEFAULT="01/01/2000">
<cflock timeout="10" throwontimeout="No" type="EXCLUSIVE" NAME="emailadd">
<CFQUERY NAME="INSOBJ"
DATASOURCE="uspc"
DBTYPE="ODBC">
INSERT INTO t_msg (dateofsend)
VALUES (###form.dateofsend###)
</CFQUERY>
</cflock>
However, when I do this, I consistently get the following error message,
regardless of setting the VALUES using ### or CreateODBCDate.
ODBC Error Code = 37000 (Syntax error or access violation)
[Microsoft][ODBC Microsoft Access Driver] Syntax error in date in query
expression '##'.
How do I solve this? Thanks in advance.
Mark
______________________________________________________________________
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