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.

Thanks.

----- Original Message -----
From: "Jochem van Dieten" <[EMAIL PROTECTED]>
To: "CF-Talk" <[email protected]>
Sent: Tuesday, May 17, 2005 12:15 PM
Subject: Re: Database error


> Rajani Chandra wrote:
> > No, I'm just using single quote, this is my code.
> >
> > <cfif IsNumeric(#qry_getSpcListInfo.ItmValue#)>
> >         <cfset valueliststr = #qry_getSpcListInfo.ItmValue#>
> > <cfelse>
> >     <cfset valueliststr = '#qry_getSpcListInfo.ItmValue#'>
> > </cfif>
>
> Use cfqueryparam.
>
> Jochem
>
> 

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