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
soumya p n
NA
41
0
Creating a text file
Jan 9 2008 12:22 AM
hiee,
Normally v create a text file using textwriter i.e,
TextWriter txt = new StreamWriter("path");
but in my case i need 2 create a text file whose name comes from database.
for example: i need 2 create a file with its name as each individual's mobile number which is stored in database.something like 1234567898.txt in which this number is retrieved frm database.
i tried doing something lik,
DataRow dr = ds.Tables[0].Rows[0];
string number = dr[5].ToString();
string path = "C:/"+number+".txt";
TextWriter txt = new StreamWriter(path);
But the error message says this path structure is not supported..
Wat can b done to solve this problem..?
Thanks in advance,
Soumya
Reply
Answers (
8
)
Trouble putting some things in context
problem with data display