Re: unexpeted result with cfqueryparam

2003-02-24 Thread Jochem van Dieten
Dina Hess wrote: But not when using cfqueryparam. Using cfqueryparam is meant to call the functionality of the database driver to do the escaping. Any escaping done by CF before that will only result in doubling the quotes twice, and therefore CF should do no escaping whatsoever of any value

Re: unexpeted result with cfqueryparam

2003-02-24 Thread Dina Hess
cfset value = String cfquery .. INSERT INTO table (field) VALUES (cfqueryparam cfsqltype=cf_sql_varchar value=#value# /cfquery Make the value anything you want, quotes, backslashes etc., it will work. I did...and it doesn't. But I think I know why now. The inserted data has to be passed

RE: unexpeted result with cfqueryparam

2003-02-24 Thread Andrew Tyrone
-Original Message- From: Dina Hess [mailto:[EMAIL PROTECTED] Sent: Monday, February 24, 2003 12:06 PM To: CF-Talk Subject: Re: unexpeted result with cfqueryparam I agree that Trim() should not influence a single quote. Nor should HTMLEditFormat(). But both do, even without

Re: unexpeted result with cfqueryparam

2003-02-24 Thread Jochem van Dieten
Dina Hess wrote: cfset value = String cfquery .. INSERT INTO table (field) VALUES (cfqueryparam cfsqltype=cf_sql_varchar value=#value# /cfquery Make the value anything you want, quotes, backslashes etc., it will work. I did...and it doesn't. But I think I know why now. It doesn't? Even if you

Re: unexpeted result with cfqueryparam

2003-02-24 Thread Dina Hess
I agree that Trim() should not influence a single quote. Nor should HTMLEditFormat(). But both do, even without CFQUERYPARAM. Please disregard the even without CFQUERYPARAM clause in the above statement...that's not true. Can't imagine what in the world I was doing to cause me to come to that

RE: unexpeted result with cfqueryparam

2003-02-24 Thread Andrew Tyrone
-Original Message- From: Dina Hess [mailto:[EMAIL PROTECTED] Sent: Monday, February 24, 2003 4:22 PM To: CF-Talk Subject: Re: unexpeted result with cfqueryparam You have to perform all operations on the variable before you use it in the SQL statement. Not really. I mean

RE: unexpeted result with cfqueryparam

2003-02-24 Thread Andrew Tyrone
-Original Message- From: Jochem van Dieten [mailto:[EMAIL PROTECTED] Sent: Monday, February 24, 2003 4:20 PM To: CF-Talk Subject: Re: unexpeted result with cfqueryparam Dina Hess wrote: I agree that Trim() should not influence a single quote. Nor should HTMLEditFormat

Re: unexpeted result with cfqueryparam

2003-02-24 Thread Jochem van Dieten
Andrew Tyrone wrote: If it's a bug, it's been there since CF 4.0 at least, which is the version I started with. Like I said in my first response, it makes sense to me that CF doesn't escape the single quotes when you are running other functions on the value. It doesn't? How do you explain

RE: unexpeted result with cfqueryparam

2003-02-24 Thread Andrew Tyrone
-Original Message- From: Jochem van Dieten [mailto:[EMAIL PROTECTED] Sent: Monday, February 24, 2003 4:49 PM To: CF-Talk Subject: Re: unexpeted result with cfqueryparam Andrew Tyrone wrote: If it's a bug, it's been there since CF 4.0 at least, which is the version I started

Re: unexpeted result with cfqueryparam

2003-02-24 Thread Dina Hess
Dina Hess wrote: cfset value = String cfquery .. INSERT INTO table (field) VALUES (cfqueryparam cfsqltype=cf_sql_varchar value=#value# /cfquery Make the value anything you want, quotes, backslashes etc., it will work. I did...and it doesn't. But I think I know why now. It doesn't?

Re: unexpeted result with cfqueryparam

2003-02-24 Thread Jochem van Dieten
Dina Hess wrote: Dina Hess wrote: cfset value = String cfquery .. INSERT INTO table (field) VALUES (cfqueryparam cfsqltype=cf_sql_varchar value=#value# /cfquery Make the value anything you want, quotes, backslashes etc., it will work. I did...and it doesn't. But I think I know why now. It

Re: unexpeted result with cfqueryparam

2003-02-24 Thread Dina Hess
: Monday, February 24, 2003 4:53 PM Subject: Re: unexpeted result with cfqueryparam Dina Hess wrote: Dina Hess wrote: cfset value = String cfquery .. INSERT INTO table (field) VALUES (cfqueryparam cfsqltype=cf_sql_varchar value=#value# /cfquery Make the value anything you want, quotes

unexpeted result with cfqueryparam

2003-02-23 Thread dhess
This behavior isn't a bug, although I can't explain why your code works in CF 5. CF's normal behavior is to escape a single quote contained in a SQL string value by doubling it. This is true whether you use the Trim() function or not. So you'll want to use PreserveSingleQuotes() to prevent CF

Re: unexpeted result with cfqueryparam

2003-02-23 Thread E. Keith Dodd
- From: [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Sunday, February 23, 2003 12:56 PM Subject: unexpeted result with cfqueryparam This behavior isn't a bug, although I can't explain why your code works in CF 5. CF's normal behavior is to escape a single quote contained in a SQL string

Re: unexpeted result with cfqueryparam

2003-02-23 Thread Jochem van Dieten
Quoting [EMAIL PROTECTED], [EMAIL PROTECTED] [EMAIL PROTECTED]: This behavior isn't a bug, although I can't explain why your code works in CF 5. I would disagree. I think it is a bug. CF's normal behavior is to escape a single quote contained in a SQL string value by doubling it. This is

Re: unexpeted result with cfqueryparam

2003-02-23 Thread Dina Hess
But not when using cfqueryparam. Using cfqueryparam is meant to call the functionality of the database driver to do the escaping. Any escaping done by CF before that will only result in doubling the quotes twice, and therefore CF should do no escaping whatsoever of any value passed through

Re: unexpeted result with cfqueryparam

2003-02-23 Thread Dina Hess
What still doesn't seem to make sense is that using the trim() in the cfqueryparam value does add an additional apostrophe, but not using trim() doesn't. Hmmmcould've sworn I tested this before but...I just tested cfqueryparam cfsqltype=cf_sql_varchar value=#showLabel# / and, sure enough,

unexpeted result with cfqueryparam

2003-02-20 Thread E. Keith Dodd
Using cfqueryparm to update table with values coming from a standard form via a CFC, using the cfargumentcollection=#form# In the form, I use HTMLEditFormat for fields where could be an apostrophe, etc. so sql insert or update goes ok. This has always worked as expected with simply

unexpeted result with cfqueryparam

2003-02-20 Thread Brad Howerter
I don't see that behavior. This code works fine for me: cfset variables.showLabel = abc's cfquery datasource=#request.ser.udsn# UPDATE foo SET showLabel = cfqueryparam cfsqltype=cf_sql_varchar value=#trim(showLabel)# / /cfquery Using cfqueryparm to update table with values

Re: unexpeted result with cfqueryparam

2003-02-20 Thread Kevin Kazmierczak
, 2003 10:03 AM Subject: unexpeted result with cfqueryparam I don't see that behavior. This code works fine for me: cfset variables.showLabel = abc's cfquery datasource=#request.ser.udsn# UPDATE foo SET showLabel = cfqueryparam cfsqltype=cf_sql_varchar value=#trim(showLabel)# / /cfquery

Re: unexpeted result with cfqueryparam

2003-02-20 Thread E. Keith Dodd
- From: Kevin Kazmierczak [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Thursday, February 20, 2003 11:09 AM Subject: Re: unexpeted result with cfqueryparam We have run across this problem also. We just didn't use cfqueryparam for that field. What are you using for your database? We

unexpeted result with cfqueryparam

2003-02-20 Thread Brad Howerter
I was mistaken. I accidentally tested the code on CF50, where it does work okay. On CFMX, updating an Oracle database, it adds an apostrophe as you say. And it only does it when trim() is used. Brad and Kevin Went back and tired not using the HTMLEditFormat--no difference. Also tried

Re: unexpeted result with cfqueryparam

2003-02-20 Thread E. Keith Dodd
; not just a feature of cfqueryparam.? (Also same results on various databases.) Thanks for input Keith - Original Message - From: Brad Howerter [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Thursday, February 20, 2003 11:10 AM Subject: unexpeted result with cfqueryparam I was mistaken