If that is the case, then check your data type for the problematic field.
I'm not sure about Oracle, but on SQL 7 and 2k the type 'char' returns your
string padded to the length of the char field. Try using varchar if this is
the case. That or remember to use TRIM() all the time.
HTH
- Nate
-----Original Message-----
From: Owens, Howard [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 27, 2001 1:29 PM
To: CF-Talk
Subject: RE: It Matchs, but CFIF says it doesn't
Thanks to Mark, Don, Tim, Andrew and Joshua for responding ...
It was a Trim() issue.
I wasn't really expecting that because I KNEW the data had been entered into
the DB without any leading or trailing spaces. I did try some tests for
that, but they didn't show any spaces. But actually using Trim() did the
trick.
BTW: I'm using SQL Server 2000.
H.
Howard Owens
Internet Operations Coordinator
www.insidevc.com
[EMAIL PROTECTED]
AIM: GoCatGo1956
> -----Original Message-----
> From: Mark Stewart [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, August 27, 2001 6:05 AM
> To: CF-Talk
> Subject: RE: It Matchs, but CFIF says it doesn't
>
> Howard,
>
> I'll just reiterate what Andrew said. I've run into this many times
> myself and every time, it's because the value is padded when coming from
> the db. Throw a trim around it and it'll be fine.
>
> Mark
>
> -----Original Message-----
> From: Tim Heald [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, August 25, 2001 12:16 AM
> To: CF-Talk
> Subject: Re: It Matchs, but CFIF says it doesn't
>
>
> If you are pulling the value of AD_SEC_LEV from a database at any time,
> make
> sure you trim the value. I have encountered many situations where there
> are
> leading or trailing spaces and it throws off my checks. A little debug
> trick we use is when we out put variables to see their value we wrap
> them
> with pipes like this:
>
> |#session.AD_SEC_LEV#|
>
> Let me know if it helped.
> ----- Original Message -----
> From: "Andrew Scott" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Saturday, August 25, 2001 12:06 AM
> Subject: RE: It Matchs, but CFIF says it doesn't
>
>
> > Try eq instead of is?
> >
> >
> > -----Original Message-----
> > From: Owens, Howard [mailto:[EMAIL PROTECTED]]
> > Sent: Saturday, 25 August 2001 10:35 AM
> > To: CF-Talk
> > Subject: It Matchs, but CFIF says it doesn't
> >
> >
> >
> > I'm doing a little security check:
> >
> > <cfif session.AD_SEC_LEV IS "administrator">
> > You're good to go.
> > <cfelse>
> > You are the weakest link. Goodbye.
> > </cfif>
> >
> > Now, I KNOW for a fact that the exact variable I'm passing as the
> > session.AD_SEC_LEV is indeed "administrator"
> >
> > But I keep getting the cfelse portion of the conditional.
> >
> > I KNOW it matches. I've checked with <cfoutput>. What are some
> reasons
> > CFIF is telling me it doesn't?
> >
> > (It's probably something simple that I'm missing, but so far, I can't
> > figure
> > it out).
> >
> > Thanks.
> >
> > H.
> >
> >
> >
> >
> > Howard Owens
> > Internet Operations Coordinator
> > www.insidevc.com
> > [EMAIL PROTECTED]
> > AIM: GoCatGo1956
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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