Preservesinglequotes() ensures that any single quotes in the text ISNT escaped. I dont think that's what's needed here.
My suggestion is to turn debugging on and see what the ACTUAL insert statement says. The error message says there's an error "NEAR" the quote. So it could be the quote that's causing the problem, or it might be a missing comma or since I notice there arent quotes around the text to be inserted, it might be that. Or any of a number of other things. The actual SQL statement is usually in the ColdFusion error message anyway, unless you have your own error handling turned on. Cheers Mike Kear Windsor, NSW, Australia AFP Webworks http://afpwebworks.com .com,.net,.org domains from AUD$20/Year On Sat, 18 Dec 2004 01:48:51 +0100, Jochem van Dieten <[EMAIL PROTECTED]> wrote: > Tony Weeg wrote: > > > > ive got a cfmx box, that for some reason when i try to insert a > > value that happens to have a ' in it... like "Tony's" which has a single > > quote... well, ive never had this problem before, and i know i have another > > server that its works fine on??? > > > > [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC SQL > > Server Driver][SQL Server]Line 21: Incorrect syntax near > > ','. > > > > is what im getting, and yes, im using cfqueryparam. > > > > ------------------- > > > > <cfquery name="insertClient" username="#application.username#" > > password="#application.password#" datasource="webCollect"> > > insert into clients > > (company, contact) > > values > > (<cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.company#">, > > <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.contact#"> > > ) > > </cfquery> > > That is weird. Could you enable debugging and show the debugging > output of a run with a value without the ' in it? > > Jochem > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Special thanks to the CF Community Suite Silver Sponsor - New Atlanta http://www.newatlanta.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188108 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

