M
microsoft.news.com
How can I this but using the dbReader instead of the streamreader and get
all the items instead of the last one in my text file i'm populating?
this works fine:
StreamReader sr = new StreamReader("file.txt");
string lines = sr.ReadLine();
while((line = sr.ReadLine()) !=null)
{
// loops thru and writes the data to the new file
}
now i need to do the same but using a dbreader
how can I get that working? I'm using
while (dbReader.Read())
{
//loops thru but its only writing the last data item to the new file
}
what else do i need to do to get this to write all the items to the new file
instead of only the last one?
S
while ((line = sr.ReadLine()) !=null)
{
all the items instead of the last one in my text file i'm populating?
this works fine:
StreamReader sr = new StreamReader("file.txt");
string lines = sr.ReadLine();
while((line = sr.ReadLine()) !=null)
{
// loops thru and writes the data to the new file
}
now i need to do the same but using a dbreader
how can I get that working? I'm using
while (dbReader.Read())
{
//loops thru but its only writing the last data item to the new file
}
what else do i need to do to get this to write all the items to the new file
instead of only the last one?
S
while ((line = sr.ReadLine()) !=null)
{