Re: Escape single quote in Multiple Row Insert Problem

2007-05-22 Thread Claude Schneegans
INSERT INTO mytable ( myNAME ) VALUES ( '#evaluate(form.myNAME#idx#)#' ) The problem is caused by the way the automatic single quote escaping process works (or does not work) in CF: It only applies to variables, not to expressions. The solution is then to evaluate your expression in a

Re: Escape single quote in Multiple Row Insert Problem

2007-05-22 Thread Claude Schneegans
You can try using PreserveSingleQuotes function. No way: PreserveSingleQuotes does not enforce single quotes escaping, on the contrary, it disables the automatic escaping done by CF in queries. -- ___ REUSE CODE! Use custom tags; See

Re: Escape single quote in Multiple Row Insert Problem

2007-05-22 Thread Les Mizzell
cfqueryparam did the trick. I just wasn't sure I could nest all that other stuff inside it. cfqueryparam cfsqltype=cf_sql_varchar value=#form[myNAME idx]# Much appreciated to all ~| Upgrade to Adobe

Escape single quote in Multiple Row Insert Problem

2007-05-21 Thread Les Mizzell
Doing a multiple row insert cfloop from=1 to=#int(request.numTRAVEL)# index=idx cfquery name=WRITE_ENROLL INSERT INTO mytable ( myNAME ) VALUES ( '#evaluate(form.myNAME#idx#)#' ) /cfquery /cfloop Works fine until somebody enters Bob O'Hara into the form. I'm having a little

Re: Escape single quote in Multiple Row Insert Problem

2007-05-21 Thread Qasim Rasheed
You can try using PreserveSingleQuotes function. HTH Qasim On 5/21/07, Les Mizzell [EMAIL PROTECTED] wrote: Doing a multiple row insert cfloop from=1 to=#int(request.numTRAVEL)# index=idx cfquery name=WRITE_ENROLL INSERT INTO mytable ( myNAME ) VALUES (

Re: Escape single quote in Multiple Row Insert Problem

2007-05-21 Thread Doug Bezona
Use cfqueryparam, VALUES ( cfqueryparam cfsqltype=cf_sql_varchar value=#evaluate( form.myNAME#idx#)#) On 5/21/07, Les Mizzell [EMAIL PROTECTED] wrote: Doing a multiple row insert cfloop from=1 to=#int(request.numTRAVEL)# index=idx cfquery name=WRITE_ENROLL INSERT INTO mytable

Re: Escape single quote in Multiple Row Insert Problem

2007-05-21 Thread Deanna Schneider
cfloop from=1 to=#int(request.numTRAVEL)# index=idx cfquery name=WRITE_ENROLL INSERT INTO mytable ( myNAME ) VALUES ( cfqueryparam cfsqltype=cf_sql_varchar value=#form[myNAME idx]# ) /cfquery /cfloop On 5/21/07, Les Mizzell [EMAIL PROTECTED] wrote: Doing a multiple row

RE: Escape single quote in Multiple Row Insert Problem

2007-05-21 Thread Bobby Hartsfield
To: CF-Talk Subject: Escape single quote in Multiple Row Insert Problem Doing a multiple row insert cfloop from=1 to=#int(request.numTRAVEL)# index=idx cfquery name=WRITE_ENROLL INSERT INTO mytable ( myNAME ) VALUES ( '#evaluate(form.myNAME#idx#)#' ) /cfquery /cfloop Works