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
krishnakumar kuna
NA
57
36.8k
Insert string from text file to database
Sep 28 2013 2:53 AM
hi,
I have text file with data like this
"first","second","third","fourth"
"first","second","third","fourth"
"first","second","third","fourth"
"first","second","third","fourth"
"first","second","third","fourth"
now i need to fetch these string to be inserted into database which is remote
if (File.Exists(fileName))
{
StreamReader sr = new StreamReader(fileName);
String line;
while ((line = sr.ReadLine()) != null)
{
if (line.Trim() != string.Empty)
{
//You will get Text Line in s.
s = line;
linetex = s.Split(',');
for (int i = 0; i <= linetex.Length - 1; i++)
{
item = linetex;
a.Text = item[2];
b.Text=item[13];
c.Text=item[17];
}
}
}
I need to insert these array items into database or is there any way i can store the string in list or enumerator or collection also helpfull.
thanks in advance
Reply
Answers (
0
)
How to create chat application in asp.net c# website...??
javascript