Link to home
Start Free TrialLog in
Avatar of Tom Sage
Tom SageFlag for United States of America

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.
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

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of VBRocks
VBRocks
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Tom Sage

ASKER

VBrocks,

Thanks for your quick response.  I get the idea.

Thanks again