How to set Dealy to read xml file

  • Thread starter Thread starter Aryan
  • Start date Start date
A

Aryan

Hi,
I have function which creates two xml files,after creation these
xml's, I am calling another function which reads these xml files. Now
this function is causing exception becuase data has not been read from
xml file and stored in using by other control. I am looking out for
some workaround by which i can delay the calls for reading out these
xml files.

Thanks in advance
Manoj
 
You could consider a thread sleep followed by a poll that tries to open the
files for exclusive use which would allow you to determine if the files had
completed being written to. If not - do it again until you can get an
exclusive lock on the files.

Regards

John Timney (MVP)
 
Back
Top