C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Reading the text from text file stroing into datatable


Posted Date: 05 Jul 2008      Total Responses: 1

Posted By: sandhya bhavani       Member Level: Gold     Points: 1



HI

Using stream reader i m reading the text line by line..in csv file
each line contains id,mobileno,message,status with comma seperated.
i want to read the data to datatable..
how to splitt those values to individual valuess.

How to read those data to datatable?

Please can u help me

Thanks
sandhya





Responses

Author: Anand    05 Jul 2008Member Level: BronzeRating:     Points: 4

After reading from the CSV file it will be in the Array.
Split each array index by ',' and the those separate
strings[] that u get will be the field that are to be in the datatable.
Initialize the datatable with the corresponding columns.
Take 2 for loops then Add those values to the datatable.
Ex: dt.Rows.Add(Colunm1,Colunm2,...);



Post Reply
You must Sign In to post a response.
Next : Login
Previous : How to draw Line on form in VB.NET ?
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use