Just go into your database and allow that field to be ZERO LENGHT.
What Kind of database are you using?
Pablo Varando
CFM-Resources.Com, Corp.
http://www.cfm-resources.com
----- Original Message -----
From: "Hubert Earl" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Sunday, April 29, 2001 11:53 AM
Subject: Re: How can I get CF to ignore a form field with no data?
> Hi Bill,
>
> Thanks for the advice. However, when I made the changes you suggested, I
> still got this error message:
>
> Error Diagnostic Information
> ODBC Error Code = S1000 (General error)
>
> [Microsoft][ODBC Microsoft Access Driver] Field 'Users.MiddleInit' cannot
be
> a zero-length string.
>
> The error occurred while processing an element with a general identifier
of
> (CFQUERY), occupying document position (2:2) to (2:28).
>
> The code I used was this:
>
> <cfif isDefined("form.MiddleInit")
> and form.MiddleInit is not "">
> MiddleInit = '#form.MiddleInit #',
> </cfif>
> MiddleInit='#MiddleInit#',
>
> Hubert
> ---
> Hubert Earl
>
> ICQ#: 16199853
> AIM: hubertfme
>
> My Jamaican Art, Craft & More Online Store:
> http://www.angelfire.com/ny/hearl/link_page_on_angelfire.html
>
>
> ----- Original Message -----
> From: "Bill Davidson" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Saturday, April 28, 2001 9:07 PM
> Subject: Re: How can I get CF to ignore a form field with no data?
>
>
> > Test it see if is blank or undefined with a cfif block in your SQL.
> > Something like:
> >
> > <CFQUERY Name="update_query" datasource="#application.dsn#">
> >
> > Update table_name
> > Set
> > <cfif isDefined("form.MiddleInit ") and form.MiddleInit is not "">
> > MiddleInit = '#form.MiddleInit #',
> > </cfif>
> > field = form.field
> > ....
> > Where
> > ....
> > </cfquery>
> >
> > -Bill
> > www.brainbox.tv
> >
> > ----- Original Message -----
> > From: "Hubert Earl" <[EMAIL PROTECTED]>
> > To: "CF-Talk" <[EMAIL PROTECTED]>
> > Sent: Saturday, April 28, 2001 7:05 PM
> > Subject: How can I get CF to ignore a form field with no data?
> >
> >
> > > Hi,
> > >
> > > How can I get CF to ignore a form field with no data? I have a form
with
> a
> > field called MiddleInit which will not always be filled in. At the
> moment,
> > however, an error message is generated if that field is blank.
> > >
> > > Sincerely,
> > > ---
> > > Hubert Earl
> > >
> > > ICQ#: 16199853
> > > AIM: hubertfme
> > >
> > > My Jamaican Art, Craft & More Online Store:
> > http://www.angelfire.com/ny/hearl/link_page_on_angelfire.html
> > >
> > >
> > >
> > >
> > >
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists