944,167 Members | Top Members by Rank

Ad:
Sep 6th, 2007
0

DataTable To CSV Don't have a clue

Expand Post »
I've built a Datatable that reads in a text file does some manipulation on it and then It's just sitting there. I've only been doing This for a few weeks and have been Stumbling through it at best. A friend of mine sent me this and said that this should work. But I am unsure on what items need to be created and What is the "sb" in the code is supposed to be? I know this needs modification but not sure how. Any Links or help would be very helpful Thank you.




[code vb6]
Dim strContents As String
Dim objReader As StreamWriter


For Each R As DataRow In TABLES.Rows
For Each o As Object In R.ItemArray
sb.Append(o.ToString + ",")
Next
sb.Append(Environment.NewLine)
Next
[/code]
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
jricklefs is offline Offline
6 posts
since Aug 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: ActiveX Problem
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: getting type mismatch





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC