|
-
May 24th, 2017, 06:38 PM
#12
Re: How To Make DataTable Static
 Originally Posted by 1369Times
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
You are passing a DataTable into this function, you have even named the parameter dt - simply make sure whatever DataTable you pass into this function has a name and it should work just fine.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|