Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 escape character

Author  Topic 

tpiazza55
Posting Yak Master

162 Posts

Posted - 2010-06-18 : 15:15:00
how do i get sql to insert
0#x0;

I need the ignore the & to make it work

Kristen
Test

22859 Posts

Posted - 2010-06-19 : 04:30:42
as a string? as binary? and into what datatype?

I'm not seeing a "&" character in your example
Go to Top of Page

tpiazza55
Posting Yak Master

162 Posts

Posted - 2010-06-21 : 11:41:37
its being passed from .net as a string and its going into an openxml statement where the xml is varchar(max)

the & is making sql kick out errors

the & is ignored when I submit in the form. I put them in quotes here

value="??f? "&" #x3;?,?u~?"&" #x1;?"&" #x1;0 "&" #x0;
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2010-06-21 : 13:15:55
Can't remember what the XML escape/encode method. Change them to

"&"


perhaps?

Stick an example of the raw XML you are sending to SQL into an XML validator. Does it validate? If not change the application until it does! the fact that other things may not mind is irrelevant if the XML won't validate properly.

We use XMLSpy (Windows Application) for XML checking and lots of other XML-related things.
Go to Top of Page
   

- Advertisement -