Rajani Chandra wrote: > Yesterday i try cfqueryparam for simple query it works, but I'm not getting > how to use cfqueryparam for my code because I'm storing all the fieldnames > and values in one single variable (SETLISTSTR) and directly passing that > variable to query. > > <cfset setliststr = "#setliststr# , #qry_getSpcListInfo.ItemName# = > '#qry_getSpcListInfo.ItmValue#'"> > > <cfquery name="qry_update" datasource="EWNDAT"> > UPDATE #qry_getSpcListInfo.PrimEntity# > SET #setliststr# > WHERE #whereclause# > </cfquery> > > I don't have any idea how to use cfqueryparam for this code, so plz help me.
You can't, you have to build the query inside the cfquery tags with some traditional cfifs. It is highly recommended, but if you don't want to do that check out PreserveSingleQuotes(): http://livedocs.macromedia.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=ColdFusion_Documentation&file=00000596.htm#134493 Jochem ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:206899 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

