Apology, here's the function that's throwing the exception. The dt is already defined as a parameter.
Code:Private Function ConvertDataToString(ByVal dt As DataTable) As String Dim conversion As String = String.Empty Using writer As IO.TextWriter = New IO.StringWriter() dt.WriteXml(writer, XmlWriteMode.WriteSchema) conversion = writer.ToString() End Using Return conversion End Function




Reply With Quote
