Hi William ,
i am sending u the text file data and code to process the text data.
Note : All this processing is done in windows service and checked with all
the encodings (Default,UTF8,u nicode). i really don't known where i am going
wrong.
------------------------------------------------------
V|173848|1|4001 938833|14250316 |dsfsdfs|sdfsdf sdfsd|100017407 6|0|sdfsdfsdfsd f|6674544|23303 10451|14260601| sdfsdf||TUR|3|1 |||asdsd|1||400 1938833|16-03-1425||||asdas|s dfsdf||sdfds|Um it|Muhriz||Cice kli|TUR|asdas|1 982/11/22||1|asdasd|1| 140946|2005/06/30|asdasd|2006/06/29|1|||233|Umit Muhriz Cicekli||||||
V|173848|1|4001 938833|14250316 |dsfsdfs|sdfsdf sdfsd|100017407 6|0|sdfsdfsdfsd f|6674544|23303 10451|14260601| sdfsdf||TUR|3|1 |||asdsd|1||400 1938833|16-03-1425||||asdas|s dfsdf||sdfds|Um it|Muhriz||Cice kli|TUR|asdas|1 982/11/22||1|asdasd|1| 140946|2005/06/30|asdasd|2006/06/29|1|||233|Umit Muhriz Cicekli||||||
V|173848|1|4001 938833|14250316 |dsfsdfs|sdfsdf sdfsd|100017407 6|0|sdfsdfsdfsd f|6674544|23303 10451|14260601| sdfsdf||TUR|3|1 |||asdsd|1||400 1938833|16-03-1425||||asdas|s dfsdf||sdfds|Um it|Muhriz||Cice kli|TUR|asdas|1 982/11/22||1|asdasd|1| 140946|2005/06/30|asdasd|2006/06/29|1|||233|Umit Muhriz Cicekli||||||
V|173848|1|4001 938833|14250316 |dsfsdfs|sdfsdf sdfsd|100017407 6|0|sdfsdfsdfsd f|6674544|23303 10451|14260601| sdfsdf||TUR|3|1 |||asdsd|1||400 1938833|16-03-1425||||asdas|s dfsdf||sdfds|Um it|Muhriz||Cice kli|TUR|asdas|1 982/11/22||1|asdasd|1| 140946|2005/06/30|asdasd|2006/06/29|1|||233|Umit Muhriz Cicekli||||||
V|173848|1|4001 938833|14250316 |dsfsdfs|sdfsdf sdfsd|100017407 6|0|sdfsdfsdfsd f|6674544|23303 10451|14260601| sdfsdf||TUR|3|1 |||asdsd|1||400 1938833|16-03-1425||||asdas|s dfsdf||sdfds|Um it|Muhriz||Cice kli|TUR|asdas|1 982/11/22||1|asdasd|1| 140946|2005/06/30|asdasd|2006/06/29|1|||233|Umit Muhriz Cicekli|||||||
-------------------------------------------------------
// Reading the text file using stream reader
//Open the file using stream reader
ObjStreamReader = new StreamReader(e. FullPath,System .Text.Encoding. UTF8);
char c = ' ';
while (ObjStreamReade r.Peek() > 0)
{
// Reading the line char by char
c = (char) ObjStreamReader .Read();
if (c != '\n')
{
strLine += c;
}
else
{
// building the Xml by splitting the strLine and
sending to the queue.
}
//Going to next line
} // end of while loop
thanks
syed
"William Stacey [MVP]" wrote:
hmm. 1MB is not large, so don't think that is the issue. Could you post a
small but complete code sample that shows the error?
--
William Stacey [MVP]
"syed javid" <sy*******@disc ussions.microso ft.com> wrote in message
news:53******** *************** ***********@mic rosoft.com... hi all,
I am getting an error when i process 1 MB txt file using StreamReader and
i
am reading char by char using streamReader.Re ad() method at some point it
is
throwing an exception System.Componen tModel.win32Exc eption:The handle is
invalid.
Any help for this problem or any kind of informaiton to process large
files
the file size can be 10 MB.
thanks in advance
Syed