I have long wished for NULL="AUTO" ...... On Thu, Sep 25, 2008 at 2:35 PM, Mark Mandel <[EMAIL PROTECTED]> wrote: > > You could shorten that to: > > <cfqueryparam cfsqltype="cf_sql_integer" value="#form.iAge#" > maxlength="3" null="#(NOT len(form.iAge))#" /> > > (I'm not a huge fan of trim's there... sometimes you want the extra spaces) > > Mark > > On Thu, Sep 25, 2008 at 2:33 PM, AJ Mercer <[EMAIL PROTECTED]> wrote: >> <cfqueryparam cfsqltype="cf_sql_integer" value="#trim(form.iAge)#" >> maxlength="3" null="#yesNoFormat(NOT len(trim(form.iAge)))#" /> >> from >> http://www.chapter31.com/2007/02/04/cfqueryparam-and-conditional-handling-of-nulls/ >> >> On Thu, Sep 25, 2008 at 1:32 PM, Zac Spitzer <[EMAIL PROTECTED]> wrote: >>> >>> yep, null=yes is always null >>> >>> it does get a little wierd between dbs with nulls.... >>> >>> in sql server an inserted empty zero length string is still considered >>> not to be null, >>> whereas oracle considers an empty string to be null... >>> >>> this means that you can have not null column in ms-sql which is 0 >>> length, which isn't null >>> while in oracle it would throw a not null violation >>> >>> z >>> >>> On Thu, Sep 25, 2008 at 2:26 PM, Mike Kear <[EMAIL PROTECTED]> wrote: >>> > >>> > OH! so in my example, it will always send NULL even if Invoiceno has a >>> > value? >>> > >>> > Cheers, >>> > Mike Kear >>> > >>> > >>> > On Thu, Sep 25, 2008 at 3:24 PM, Lucas <[EMAIL PROTECTED]> wrote: >>> >> >>> >> Hi Mike, >>> >> yep that is the one... but to be safe, put some logic in such that it >>> >> send only one or the other. >>> >> >>> >> L. >>> >> >>> >> On Thu, Sep 25, 2008 at 2:23 PM, Mike Kear <[EMAIL PROTECTED]> >>> >> wrote: >>> >>> >>> >>> I'm afraid that either I'm a bit dense today or the CF8 docs are a bit >>> >>> vague on this .. but is my understanding correct? Can someone >>> >>> please tell me if the following statement is correct or not? : >>> >>> >>> >>> IN a CFQUERYPARAM, if you put NULL="yes", it will send a NULL >>> >>> value to the database if you have no value >>> >>> >>> >>> Or in other words, i have a cfquery that includes the following: >>> >>> >>> >>> InvoiceNo = <cfqueryparam value="#invoiceno#" NULL="yes" >>> >>> cfsqltype="cf_sql_integer"/> >>> >>> >>> >>> If the current value of #invoiceno# is "", (i.e. no value) the >>> >>> cfqueryparam will send to the database the following; >>> >>> >>> >>> Invoiceno = NULL >>> >>> >>> >>> Is my understanding correct? >>> >>> >>> >>> -- >>> >>> Cheers >>> >>> Mike Kear >>> >>> Windsor, NSW, Australia >>> >>> Adobe Certified Advanced ColdFusion Developer >>> >>> AFP Webworks >>> >>> http://afpwebworks.com >>> >>> ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month >>> >>> >>> >>> > >>> >>> >>> >> >>> >> >>> >> >>> >> -- >>> >> Lucas >>> >> >>> >> http://www.thebitbucket.net/ >>> >> >>> >> > >>> >> >>> > >>> > >>> > >>> > -- >>> > Cheers >>> > Mike Kear >>> > Windsor, NSW, Australia >>> > Adobe Certified Advanced ColdFusion Developer >>> > AFP Webworks >>> > http://afpwebworks.com >>> > ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month >>> > >>> > > >>> > >>> >>> >>> >>> -- >>> Zac Spitzer - >>> http://zacster.blogspot.com (My Blog) >>> +61 405 847 168 >>> >>> >> >> >> >> -- >> AJ Mercer >> Web Log: http://webonix.net >> >> >> Once you come to the realisation that everyone is crazy, >> You will never be surprised or disappointed ever again. >> AJM 2008 >> >> > >> > > > > -- > E: [EMAIL PROTECTED] > W: www.compoundtheory.com > > > >
-- Zac Spitzer - http://zacster.blogspot.com (My Blog) +61 405 847 168 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "cfaussie" group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~----------~----~----~----~------~----~------~--~---