TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ankit Agarwal
NA
379
253.2k
how to import updated pipe separated text file's data using?
Sep 2 2013 1:57 AM
Hello,
I am using this code for export datagridview's data to pipe separated txt file.
StreamWriter sw = new StreamWriter(filePath, false);
int iColCount = dataTable.Columns.Count;
//for (int i = 0; i < iColCount; i++)
//{
// sw.Write(dataTable.Columns[i]);
// if (i < iColCount - 1)
// {
// sw.Write("|");
// }
//}
//sw.Write(sw.NewLine);
foreach (DataRow row in dataTable.Rows)
{
for (int i = 0; i < iColCount; i++)
{
if (!Convert.IsDBNull(row[i]))
{
sw.Write(row[i].ToString());
}
if (i < iColCount - 1)
{
sw.Write("|");
}
}
sw.Write(sw.NewLine);
}
sw.Close();
It's code running successfully, i mean to say, successfully exported in pipe separated file but when we update any value in it's export's file and then import same file in to the database using c# .net so,my database did not update from this file.
Please help me.
Thanks in Advance
Ankit Agarwal
Software Engineer
Reply
Answers (
5
)
datetime color
size of list view