I am populating a data table with data when I attempt to read a field (varchar(1000)) from the data table using vb.net.
Dim Itemtext = Rdt.Rows(X).Item("varcharfield")
When I look at the string there is a lot of white space included. As I am writing the returned value to an xml document this causes a major problem as the string has become far too big for the schema of the xml. I have tried trim and rtrim when reading the value but get the same result. Why should I get this when the actual text content of the field is only 30 characters?
What I want is:
What I get is!