> Why can't you use cfqueryparam?

I have actually experienced this myself with the following, and only
on MS SQL Server.  The same statement works great in mySQL, Access and
Oracle.  In the code below, if we are running SQL Server
(localgrid.usedb=2) execution branches to bypass cfqueryparam.

I've seen the same problem with MS Access date fields.  I have yet to
see a cfsqltype that will work with one of those, and working the
problem from the other end have been unable to figure out a config
within access itself that will work with one of the cfsqltypes.

<cfif Compare(LocalGrid.UseDB,"2")>
        #TempGrid.QueryFieldName# LIKE 
        <cfqueryparam 
                cfsqltype="#TempGrid.SType#" 
                value="%#Evaluate(TempGrid.SearchText)#%">
<cfelse>
        <!--- 
        sql server doesn't like cfqueryparam and fuzzy LIKE, so ... 
        --->
        #TempGrid.QueryFieldName# LIKE '%#Evaluate(TempGrid.SearchText)#%'
</cfif>

-- 
--mattRobertson--
Janitor, MSB Web Systems
mysecretbase.com

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:192390
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

Reply via email to