Thomas Chiverton wrote:

> I'm playing with some UDF's, and have this section of code
> --
> <cfoutput>
> where:<br>
> #MakeWhereClause(CreateRecordID( qQuery))#
> </cfoutput>
>               
> <cfquery name="qDoesit" datasource="#request.dbname#">
> select * from actuals where #MakeWhereClause(CreateRecordID( qQuery))#
> </cfquery>    
> --
> This produces:
> --
> where:
> dateid='04-Jan-01' and gcljobno=200140206 and taskid='GCL001' and
> starttime='09:00' and resourceid='tchiverton' 
> --
> Then the error:
> --
> ODBC Error Code = S1000 (General error) 
> [Oracle][ODBC][Ora]ORA-00933: SQL command not properly ended 
> SQL = "select * from actuals where dateid=''04-Jan-01'' and
> gcljobno=200140206 and taskid=''GCL001'' and starttime=''09:00'' and
> resourceid=''tchiverton''"
> --
> 
> So although my MakeWhere UDF is returning a correctly escaped SQL string,
> when it goes inside the cfquery, and does the same bit of code, CF seems to
> be adding extra quote marks.
> 
> Is this known behaviour ? Any way to run it off ? Other pleas for help
> appreciated ? :-)


Would PreserveSingleQuotes() help?

Jochem



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to