Or even better

<cfparam name="form.notqualifiedId" default="">

update accounts set
NOTQUALIFIEDID = <cfqueryparam cfsqltype="CF_SQL_VARCHAR"
value="#form.notqualifiedId#" null="#YesNoFormat(NOT
IsMSSQLGUID(form.notqualifiedId))#">
where accountNumber = 1

> -----Original Message-----
> From: Tony Weeg [mailto:[EMAIL PROTECTED]
> Sent: woensdag 2 juni 2004 5:58
> To: CF-Talk
> Subject: RE: mssql NULL
>
> well, self... do this... this works:
>
> <cfif NOT (isDefined("form.notqualifiedId") and
> IsMSSQLGUID(form.notqualifiedId))>
> <cfset form.notqualifiedId = "NULL">
> </cfif>
>
> then in the sql statement...
>
> update accounts set
> NOTQUALIFIEDID = <cfif form.notqualifiedId is "NULL">NULL,
> <cfelse>'#form.notqualifiedId#',</cfif>
> where accountNumber = 1
>
> :) wow self, good stuff.
>
> (apart from cfqueryparam, but im preventing bad data in the
> capturing of the data)
>
> thanks anyway, good night.
>
> ....tony
>
> Tony Weeg
> sr. web applications architect
> navtrak, inc.
> [EMAIL PROTECTED]
> 410.548.2337
> www.navtrak.net
>
> -----Original Message-----
> From: Tony Weeg [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 01, 2004 11:47 PM
> To: CF-Talk
> Subject: mssql NULL
>
>
> this errors.
>
> <cfif NOT (isDefined("form.notqualifiedId") and
> IsMSSQLGUID(form.notqualifiedId))>
> <cfset form.notqualifiedId = NULL>
> </cfif>
>
> I want to send null to the database as the value.
>
> can this be done, so that I can then, in turn, do this.
>
> update accounts set notQualifiedId = #form.notQualifiedId# where
> accountNumber = 1
>
> thanks.
>
> ....tony
>
> r e v o l u t i o n w e b d e s i g n
> [EMAIL PROTECTED]
> www.revolutionwebdesign.com
>
> its only looks good to those who can see bad as well
> -anonymous
>
>
>
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to