> 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.

Well, you can't place actual SQL commands within your CFQUERYPARAM values,
since the whole point of CFQUERYPARAM is to let the database clearly
differentiate between SQL commands and data. So, to use CFQUERYPARAM you
will need to restructure your SQL so that you don't generate commands and
data within a single string. For example, you could loop over your variables
directly within your CFQUERY tag.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized 
instruction at our training centers in Washington DC, Atlanta, 
Chicago, Baltimore, Northern Virginia, or on-site at your location. 
Visit http://training.figleaf.com/ for more information!


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