That's a misleading error... I think it's straight syntax... are you sure it's "lastname" ?
Mark A. Kruger, MCSE, CFG (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com -----Original Message----- From: Terry Troxel [mailto:[email protected]] Sent: Wednesday, June 01, 2011 5:03 PM To: cf-talk Subject: Using LIKE in CF8 I have been doing this forever with no problems until today. Can anyone spot my error(s)?: <cfquery name="searcher" datasource="rnc"> select * from leads where 0 = 0 <cfif lname NEQ ""> and lastname LIKE '#lname#%' </cfif> </cfquery> which give me this error: Error Executing Database Query. [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1. The error occurred in *C:\Inetpub\wwwroot\RNC\lmain.cfm: line 13* 11 : select * from leads where 0 = 0 12 : <cfif lname NEQ "">*13 : and lastname LIKE '#lname#%'* 14 : </cfif> 15 : </cfquery> ------------------------------ SQLSTATE 07002 SQL select * from leads where 0 = 0 and lastname LIKE 'tro%' VENDORERRORCODE -3010 DATASOURCE rnc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345042 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

