Tom Sage
asked on
.NET error - Join of row.ItemArray in DataTable
I have some data in a DataTable. I want to write it to a tab delimited file.
In the following code I am getting this error on the Join command:
System.ArgumentException: Argument 'SourceArray' cannot be converted to type 'String'.
I am using VS 2008 and .NET 2.0. Thanks for any ideas.
In the following code I am getting this error on the Join command:
System.ArgumentException: Argument 'SourceArray' cannot be converted to type 'String'.
I am using VS 2008 and .NET 2.0. Thanks for any ideas.
Dim row As DataRow
Using sOut As New StreamWriter(tabFileName)
For Each row In dt.Rows
sOut.WriteLine(Join(row.ItemArray, vbTab))
Next
End Using
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for your quick response. I get the idea.
Thanks again