473,387 Members | 1,592 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Close file handle to rewrite in teh same VB session

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
Nov 21 '05 #1
3 3537
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
Nov 21 '05 #2
"Bill Nguyen" <bi*****************@jaco.com> schrieb:
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.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #3
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
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:Oo**************@TK2MSFTNGP09.phx.gbl...
"Bill Nguyen" <bi*****************@jaco.com> schrieb:
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.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Spam sucks | last post by:
Hello, Could somebody explane me how i can read a session file and unserialize it and read the array that is created. **script for reading session files** function getUsersOnline() { $count...
5
by: | last post by:
I am having a major problem with file transfers - they are ending early when the bandwidth tops-out. Smaller files transfer just fine, but large files (12Mb+) can 'abort' the transfer after maybe...
4
by: Champika Nirosh | last post by:
Hi All, I have a asp .net app and it is a online test application so tracking the user behaviour is very important. The problem is in what way I can identify the user logoff time if it happens...
4
by: Pierke | last post by:
Hey guys out there, I really need your help, i am building up a web site, so for security reasons i need to do "some things" before the user log off, and i indeed do it. Now the matter is that...
20
by: Harry | last post by:
My development environment is Framework 1.1, ASP.Net and IE 6.X. I have logout button in all the screens in the application. I am doing database activity when the user clicks on logout button....
14
by: Paul | last post by:
Hi I have 2 functions in java script, one opens a second window-this works, the other is supposed to close this second window, does not seem to be working. Just wondering if anyone had any ideas....
1
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting"...
6
by: Aaron Gray | last post by:
Hi, Is there any tool that will concatinate JavaScript files compacting them spacewise and removing comment fields ? I have some sed script that sort of does the job but was wondering if there...
0
by: meLlamanJefe | last post by:
I have the following code snippet that is used in a simple multi-threaded server program I am testing. The ServerSocket class binds to a port and creates a listening socket. Then it sits and waits...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.