I have a program that calls a method in my web service. The method executes a stored procedure and then returns a DataTable to my program. I have used it many times and works just fine except for one stored procedure that I call. The stored procedure works just fine and fills the DataTable, but when I return my DataTable to my program I get the following error:
There is an error in XML document
Inner Exception:
'.', hexadecimal value 0x00, is an invalid character. Line 1, position 270757.
"00" is an invalid character. John Saunders
Use File->New Project to create Web Service Projects
Use WCF for All New Web Service Development, instead of old ASMX or obsolete WSE
I realize that. 0x00 is a null value if I'm not mistaken, but I don't know how to fix it. Is there some property I can set on my datatable to allow nulls or to I have to go through all the null values in my tables and put data in them?
You need to find out where the stored procedure is placing a null, then figure out why.
It's possible that your stored procedure is returning binary data in a varchar column, which is bad. If so, then that column needs to become varbinary.
You can't "fix" it without knowing what's wrong. John Saunders
Use File->New Project to create Web Service Projects
Use WCF for All New Web Service Development, instead of old ASMX or obsolete WSE
Marked As Answer byedhickeyTuesday, May 26, 2009 6:56 PM
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.