views:

81

answers:

2

Hi All,

I am using SQL Server 2008 Web Edition and it seems my SQL queries are automagically having the double quotes replaced with ' + CHAR(34) + '. I am trying to pin down why this is happening, I am using Delphi with ASP.NET and using the ADO.NET object for the SQL.

Has anyone come across this before?

A: 

You could try escape them: Result = System.Text.RegularExpressions.Regex.Replace(InputTxt, @"[\000\010\011\012\015\032\042\047\134\140]", "\\$0");

EDIT: sorry, didn't realize you were using delphi. I'm sure the theory still applies even if the code doesn't.

Matt
I am trying to not to hack it in some way if there is an option I am missing somewhere. No worries about the langauge, I have learned to use C# and VB since moving to ASP.NET, there isn't much resource for ASP.NET in delphi :)
webnoob
+2  A: 

It turns out that it isn't ASP.NET or Delphi causing the issue but is the editor I am using to allow the user to input data. It is replacing all the double quotes before spitting the content out to me.

webnoob