Close file handle to rewrite in teh same VB session

  • Thread starter Thread starter Bill Nguyen
  • Start date Start date
B

Bill Nguyen

When my app attempts to save a particular file in
the same VB session, I got an error message . If I
close the app and run again, the file is overwritten ok. I guess I need to
close the file handle somehow to avoid this error but don't know how.
Any help is greatly appreciated.

Thanks
Bill
 
Bill,

You need to close and sometimes even flush the files in time

In normal situations is there is nothing that you should do with handles.

I hope this helps,

Cor
 
Bill Nguyen said:
When my app attempts to save a particular file in
the same VB session, I got an error message . If I
close the app and run again, the file is overwritten ok. I guess I need to
close the file handle somehow to avoid this error but don't know how.

How do you open the file? Make sure you call the 'Close' method of the
'StreamWriter'/... and dispose image objects based on the file.
 
Sorry that my post was not very clear.
I did not opeen any file, only using the Mappoint .Save() function to save
an html-formatted map to the folder. I guess at this point the newly written
file is still open. It will be ok if I do not attempt to save the same
filename again during a VB runtime session. I need to know how to close the
file completely after saving/writing it to the folder so that I can access
it again during the session.

Thanks
Bill
 

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

Back
Top