EOF Occurs Early



I have an interesting problem with file IO, maybe even a bug in the CLR.

I call a method that uses an XmlReader to loop through 4 MB XML files and
store the text in a database. I select the files in a file select dialog and
loop through the filename array, calling the XmlReader method each time.

If I input one file, everything works properly. If I input several files,
the first file is not read completely. The rest are then processed
correctly. It doesn't matter which file is the first file selected, it
always results in incomplete data from that file. In fact, it always drops
off at the same record each time, about a quarter way through the file.

I checked with the debugger, and when the file hits the record where it
drops out, the XmlReader reports end of file.

Has anyone heard of a similar problem as this? Any ideas how I might fix or
workaround the problem?

I tried adding a FileStream to the XmlReader but it didn't help.

--
Regards,

Fred Chateau
http://hotelmotelnow.com


.



Relevant Pages

  • Re: EOF Occurs Early
    ... Fred Chateau ... and loop through the filename array, calling the XmlReader method each ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: EOF Occurs Early
    ... When five or more files are selected, the first file shows ... and loop through the filename array, calling the XmlReader method each ... I checked with the debugger, and when the file hits the record where it ... I tried adding a FileStream to the XmlReader but it didn't help. ...
    (microsoft.public.dotnet.languages.csharp)