E
Eric Kiernan
I open and read a textfile ( 5500 lines ), check for conditions on each
line, and sometimes add ( 384 count )to a access mdb database; When I
run it, it would just go south and become unresponsive, and when i would
finally terminate it through task manager, there would be no records in
the table. I ended up putting the program to sleep peiodically as
below, and now everything works great. is this a known problem, or am i
doing something wrong?
StreamReader sr = new StreamReader(fs);
int loopCntr = 0;
while (sr.Peek() != -1) {
loopCntr++;
if ( loopCntr /100 == 0 ) {
Thread.Sleep(1);
} }
line, and sometimes add ( 384 count )to a access mdb database; When I
run it, it would just go south and become unresponsive, and when i would
finally terminate it through task manager, there would be no records in
the table. I ended up putting the program to sleep peiodically as
below, and now everything works great. is this a known problem, or am i
doing something wrong?
StreamReader sr = new StreamReader(fs);
int loopCntr = 0;
while (sr.Peek() != -1) {
loopCntr++;
if ( loopCntr /100 == 0 ) {
Thread.Sleep(1);
} }