I fell for this a couple of times here.   Maybe check your table there is a
property on the field in access to allow blan.   I was working with some VB
stuff and took me an hour to figureout it was not VB but a setting in access
table.

Long shot but worth checking

Cya
David

----- Original Message -----
From: "Chad Gray" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, November 13, 2001 3:49 PM
Subject: SQL INSERT


> This seems like such a beginner question, but can you use INSERT INTO with
> form fields that are left blank?  ( i am using <cfparam name="form.var"
> default=""> for the radio buttons, and check boxes on the action page )
>
> Im getting a "Syntax error in INSERT INTO statement".  THe statement works
> fine if all the fields in the form are filled out.  If i submit the form
> with all blanks i get this error.
>
> The resulting SQL statement looks something like this on the action page:
>
> SQL =
> INSERT INTO products (FILENAME,DIM,CONFIG)
> VALUES ('',,'')
>
> This is with a MS Access database also.
>
> DO i have to have to do:
> INSERT INTO products (<CFIF form.var is not "">FILENAME</CFIF>)
> VALUES (<CFIF form.var is not "">#form.filename#</CFIF>)
>
> I hope not!
>
>
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
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

Reply via email to