473,326 Members | 2,173 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,326 software developers and data experts.

error writing to a newly created path

I'm creating a directory and a file in the directory. When I try to write
to the file I get the following error:
"Can not access the file ... because it is being used by another process".

The directory and file are created just fine - in fact, I can restart the
program and since the path has already been created, I can write to the file
with no problem. I only get the error when I have to first create the path
and then I try to write to the file.
Any help is appreciated!
Nov 20 '05 #1
18 1031
Post some code please. Its possible that the method you used to create the
file hasn't released its lock.

"Eddie Suey" <es***@inBizServices.com> wrote in message
news:u6**************@TK2MSFTNGP09.phx.gbl...
I'm creating a directory and a file in the directory. When I try to write
to the file I get the following error:
"Can not access the file ... because it is being used by another process".

The directory and file are created just fine - in fact, I can restart the
program and since the path has already been created, I can write to the file with no problem. I only get the error when I have to first create the path and then I try to write to the file.
Any help is appreciated!

Nov 20 '05 #2
Cor
Hi Eddie,

How do you create the path

Please a piece of code first, now you can get a million answers and a thread
from a mile here and one of them can maybe right.

Cor
Nov 20 '05 #3
* "Eddie Suey" <es***@inBizServices.com> scripsit:
I'm creating a directory and a file in the directory. When I try to write
to the file I get the following error:
"Can not access the file ... because it is being used by another process".

The directory and file are created just fine - in fact, I can restart the
program and since the path has already been created, I can write to the file
with no problem. I only get the error when I have to first create the path
and then I try to write to the file.


Post the code you use to create the file.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #4
Hi Eddie,

Just in case you didn't get the message, lol, post some code.

Regards,
Fergus
Nov 20 '05 #5
* "Fergus Cooney" <fi******@tesco.net> scripsit:
Just in case you didn't get the message, lol, post some code.


Why do you reply this to me?!

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #6
Hi Herfried,

3:49 Robin "Post some code please"
3:53 Cor "Please a piece of code"
8:10 HK "Post some code"
8:51 FC "Post some code"

Regards,
Fergus
Nov 20 '05 #7
Cor
Hi Herfried,

I think to overcome that Eddie thinks he has 4 answers and now he has only
to read 3 times the same.
Just in case you didn't get the message, lol, post some code.


Why do you reply this to me?!


Robin and I had send this message already at almost exactly the same time
16:49 and 16:53

Armin calls that "Echo of" Herfried

:-)) big smile

Cor
Nov 20 '05 #8
* "Fergus Cooney" <fi******@tesco.net> scripsit:
3:49 Robin "Post some code please"
3:53 Cor "Please a piece of code"
8:10 HK "Post some code"
8:51 FC "Post some code"


Mhm... My newsreader doesn't show the complete thread...

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #9
Cor
Fergus,
Next time maybe

3:49 BSI Robin "Post some code please"
3:53 BSI Cor "Please a piece of code"
8:10 BSI HK "Post some code"
8:51 BSI FC "Post some code"

(I now see that I do it to always wrong by writing GMT because of our
European summertimes)

For Herfried and me it is one Hour later.
:-)
Cor
Nov 20 '05 #10
* "Cor" <no*@non.com> scripsit:
Next time maybe

3:49 BSI Robin "Post some code please"
3:53 BSI Cor "Please a piece of code"
8:10 BSI HK "Post some code"
8:51 BSI FC "Post some code"

(I now see that I do it to always wrong by writing GMT because of our
European summertimes)

For Herfried and me it is one Hour later.


I didn't know that we live in the same timezone...

;-)

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #11
Hi Cor,

][ Echo of Herfried

LOL

Regards,
Fergus
Nov 20 '05 #12
Come back to OE.??
Nov 20 '05 #13
* "Fergus Cooney" <fi******@tesco.net> scripsit:
Come back to OE.??


In my newsreader I have to specify how many messages I want to read. If
there are a lot of messages and I type, for example, 400, I won't see
all messages.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #14
Hi Herfried,

Ah. And you download message bodies as well as headers, I believe.

Regards,
Fergus
Nov 20 '05 #15
* "Fergus Cooney" <fi******@tesco.net> scripsit:
][ Echo of Herfried

^^

:-(((

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #16
* "Fergus Cooney" <fi******@tesco.net> scripsit:
Ah. And you download message bodies as well as headers, I believe.


The messages are on my Hamster...

;-)

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #17
:-(((

Oh, poor Herfried, you look so sad. :-(

Fergus
Nov 20 '05 #18
* "Fergus Cooney" <fi******@tesco.net> scripsit:
:-(((

Oh, poor Herfried, you look so sad. :-(


;-)

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #19

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

Similar topics

5
by: TimS | last post by:
I am getting a baffling File not found error (0x800A0035). I am writing asp on a windows 2000 server. I build a path and filename from several fields in a jet database using SQL commands, like...
4
by: Polly | last post by:
I had a macro that ran a parameter query and created and opened an Excel file with the system date as part of the file name, but I had to change the file name by hand. So I converted the macro to...
8
by: Razak | last post by:
Hi, I have a class which basically do Impersonation in my web application. From MS KB sample:- ++++++++++++++++++++code starts Dim impersonationContext As...
9
by: Tim D | last post by:
Hi, I originally posted this as a reply to a rather old thread in dotnet.framework.general and didn't get any response. I thought it might be more relevant here; anyone got any ideas? My...
4
by: mcwooq | last post by:
Hi, I just installed the VS.Studio 2005 Team Edition for Developper and encountered severe problems with debugging ASP.NET 2.0 projects. Even newly empty created ASP 2.0 projects can't debug...
3
by: MovnOn | last post by:
I've created an installation package for my program. Before installation, I use the User Interface to get values that are added to the registry. One of the values that the user must add is a path...
21
by: one2001boy | last post by:
PostMessage() function returns ERROR_NOT_ENOUGH_QUOTA after running in a loop for 700 times, but the disk space and memory are still big enough. any suggestion to resolve this problem? thanks.
2
by: contractsup | last post by:
Environment: $ uname -a AIX <withheld2 5 000100614C00 $ db2level DB21085I Instance "<withheld>" uses "32" bits and DB2 code release "SQL08024" with level identifier "03050106"....
3
by: raj200809 | last post by:
when i m sending mail i received error from symantec Antivirus" Your email message was unable to be sent because your mail server rejected the message 550-5.7.1 the ip you’re using to send mail is...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.