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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:221209
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54