I am using the XMLTextWriter to build an XML string and pass it to the
XMLDocument. When I get the data from SQL Server, some of the values
passed to the XML are NULL in the database. When I try and run an
update to database using the same XML string, (using SQL parameters to
pass the selectsinglenode), the XML always shows the NULL values as an
empty string "". This is then updating the database with an empty
value rather than keeping the NULL (which if the XML passed single
quotes, I assume the NULL would be there).
I use the SqlDbType to set the datatype of each parameter I pass.
I've had to set up all paramerter value types with the ConvertTo.Int32
when I have an Int datatype... Do I need to convert my char and
varchar fields so I can get a NULL value rather than the empty string?
I'm very new to all this. If you need more information to help me
resolve this problem, please let me know.