How to set Dealy to read xml file

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
 
J

John Timney \(MVP\)

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top