PREPARE XML DOCUMENT
While handling using bulk inserts / updates ( using XMl in Stored Procedures )
care must be taken to handle to below characters.
1. &
2. <
3. >
4. '
5. "
XMl cannot process these symbols.
We need to pass them as html codes so that they get inserted properly.
1. &
2. <
3. >
4. "
5. '
As shown below.
strRemarks = Textbox.Replace("&", "&")
strRemarks = strRemarks.Replace("<", "<")
strRemarks = strRemarks.Replace(">", ">")
strRemarks = strRemarks.Replace("""", """)
strRemarks = strRemarks.Replace("'""'", """)
strRemarks = strRemarks.Replace("'", "'")
Thursday, February 19, 2009
Subscribe to:
Post Comments (Atom)

0 comments:
Post a Comment