Hi Jason,

Just for variety.. another option is to assign the
Evaluated values to a local variable.

<cfset thisVCurResponse = TRIM(EVALUATE(VCurResponse))>
<cfset thisVCurPK = VAL(EVALUATE(VCurPK))>

UPDATE TBL_Poll_Responses
SET  Response = '#thisVCurResponse#'
WHERE  response_id = #thisVCurPK#

But I would recommend cfqueryparam..

Regards,

Adam Chapman
Virtualtours.com.au
mailto:[EMAIL PROTECTED] 

Phone: 1300 366 122
Int: +61 3 9720 5733
Fax: +61 3 9720 6377

-----Original Message-----
From: Jason Bayly [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 24, 2004 10:11 AM
To: CFAussie Mailing List
Subject: [cfaussie] Single quote issue


Hi Guys/Gals,

For some reason my inserts are failing due to single quotes. I though CF
automatically escaped them in SQL statements.

UPDATE TBL_Poll_Responses
SET  Response = '#EVALUATE(TRIM(VCurResponse))#'
WHERE  response_id = #EVALUATE(VCurPK)#

I need to set my vars dyanmically as im building a quiz app (with many
variables), so i need to use the evaluate the function.. Would this be
causing my DB errors? (Line 2: Incorrect syntax near '2'.) etc..

Any thoughts?

Jason



---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
[EMAIL PROTECTED]

MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004

Reply via email to