Maybe you could defined defaults in the Database. That might help.

> So such luck.  Since the form is defining the var to "" the <cfparam ... 
> default="0"> is not taking effect.
> 
> Guess i will just have to write the <CFIF> logic that Bryan was talking 
> about.  This sucks since i have about 30 inputs to check.
> 
> Thanks everyone!
> 
> 
> 
> At 07:11 PM 11/13/2001 -0500, you wrote:
> >Some of them are.... i will try this.  Thanks.
> >
> >At 01:03 PM 11/14/2001 +1300, you wrote:
> > >The fields that you're inserting into wouldn't happen to be number
> fields
> > >would they?
> > >
> > >if so you might want to do <cfparam name="form.var" default="0">
> > >
> > >-----Original Message-----
> > >From: Chad Gray [mailto:[EMAIL PROTECTED]]
> > >Sent: Wednesday, 14 November 2001 12:50 p.m.
> > >To: CF-Talk
> > >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