Just trying to wrap my head around this one, because it looks
interesting.  Not sure I'll be much help...

So, if the length of your string is between 190 and 193, the LIKE
section is fired and works fine?  But if string length > 193 the LIKE
section fires and you get a "200" error?  That is strange, to be sure.
Maybe it would help if you posted the error message.

> -----Original Message-----
> From: JediHomer [mailto:[EMAIL PROTECTED] 
> Sent: Monday, October 17, 2005 9:17 AM
> To: CF-Talk
> Subject: QoQ, CFQueryParam and LIKE
> 
> Hi all,
> 
> I'm running across a weird problem involving LIKE statements in Query
> of Queries.
> 
> Basically,  in the initiation of a CFC, a query is made to the DB.
> 
> One of the CFC methods performs a LIKE or = depending on string length
> to the this.table.
> 
> Currently the SQL looks something like:
> 
> <cfquery ... >
> SELECT copy
> FROM THIS.Table
> WHERE
>       <cfif Len(Arguments.theCopy) GT 190>
>               Lower(originalCopy) LIKE (<cfqueryparam value="#sCopy#%"
> cfsqltype="cf_sql_varchar" />)
>       <cfelse>
>               Lower(originalCopy) = <cfqueryparam value="#sCopy#"
> cfsqltype="cf_sql_varchar" />
>       </cfif>
> </cfquery>
> 
> 
> If the value of sCopy is above 190ish then the query crashes with a
> "200" error?!?!
> Removing the % allows the query to run OK...
> 
> Trying to simplify this, to rule out the copy being passed in, i added
> the following code:
> 
> <cfset sCopy = RepeatString("a", 194)>
> 
> If the number is 194 then the query crashes, if the number is 193 or
> less the query is fine.
> 
> Does anyone know what is happening, and if its possible to fix this?
> 
> 
> TIA


[INFO] -- Access Manager:
This transmission may contain information that is privileged, confidential 
and/or exempt from disclosure under applicable law.  If you are not the 
intended recipient, you are hereby notified that any disclosure, copying, 
distribution, or use of the information contained herein (including any 
reliance thereon) is STRICTLY PROHIBITED. If you received this transmission in 
error, please immediately contact the sender and destroy the material in its 
entirety, whether in electronic or hard copy format.  Thank you.   A2



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:221213
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to