473,322 Members | 1,287 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,322 software developers and data experts.

Process cannot access the file because it is being used by another process

Hi,

I have an application which displays a PDF file on webbrowser control
in Visual Basic. On click of a button this PDF is re-generated and
overwritten. As the PDF is already open following error message comes
while trying to overwrite.

runtime error -2147024864

The Process cannot access the file because it is being used by another
process.

I have solved this issue previously by using "webbrowser.stop"
command. After inserting this statement the error message did not come
up. But now Win XP users are getting the above error again. I have
tested this on my machine (which is a Win XP machine) and it works
fine for me. Not able to figure what problem could be there with the
users XP system.

Can any one please tell me what could be causing the problem (any
security settings with XP or IE etc)..

Thanks,

Nani

Jul 3 '07 #1
6 10035
On Jul 3, 12:58 am, None <chaitu.sunk...@gmail.comwrote:
Hi,

I have an application which displays a PDF file on webbrowser control
in Visual Basic. On click of a button this PDF is re-generated and
overwritten. As the PDF is already open following error message comes
while trying to overwrite.

runtime error -2147024864

The Process cannot access the file because it is being used by another
process.

I have solved this issue previously by using "webbrowser.stop"
command. After inserting this statement the error message did not come
up. But now Win XP users are getting the above error again. I have
tested this on my machine (which is a Win XP machine) and it works
fine for me. Not able to figure what problem could be there with the
users XP system.

Can any one please tell me what could be causing the problem (any
security settings with XP or IE etc)..

Thanks,

Nani
Aren't you wrapping the open code in a try catch? If so the users
shouldn't be seeing any errors at all?

Thanks,

Seth Rowe

Jul 3 '07 #2
once the PDF attachment is received from the server it overwrites the
existing file.
This is when the application throws the run time error (as the
existing file is in opened).
Jul 3 '07 #3
On Jul 3, 7:29 am, None <chaitu.sunk...@gmail.comwrote:
once the PDF attachment is received from the server it overwrites the
existing file.
This is when the application throws the run time error (as the
existing file is in opened).
Okay, let me see if I get this or not.

There is a PDF on the server.

The client clicks a button and the PDF is loaded into a webbrowser.

The client clicks a button to reload the PDF and kaboom an error
occurs.

Is this correct?

Thanks,

Seth Rowe

Jul 3 '07 #4
That explanation is way too simple.

I have given such explanation to just explain the error.

In the actual situation a PDF is generated with some parameters on the
server and is sent back to the exe.
This exe displays it on a screen using webbrowser.
The button which is causing the error is used to regenerate the letter
with some user defined data.
When this button is clicked the PDF is regenerated and sent back to
exe. This PDF then overwrites the existing file but cannot succeed as
the file is already open.

I could get rid of the error using webbrowser.stop statement but now
this issue again came up with some XP systems.

And one more thing which I did not mention is ...this issue is
happening only with Adobe 7.0 (not with earlier versions).

Jul 3 '07 #5
On Jul 3, 8:44 am, None <chaitu.sunk...@gmail.comwrote:
That explanation is way too simple.

I have given such explanation to just explain the error.

In the actual situation a PDF is generated with some parameters on the
server and is sent back to the exe.
This exe displays it on a screen using webbrowser.
The button which is causing the error is used to regenerate the letter
with some user defined data.
When this button is clicked the PDF is regenerated and sent back to
exe. This PDF then overwrites the existing file but cannot succeed as
the file is already open.

I could get rid of the error using webbrowser.stop statement but now
this issue again came up with some XP systems.

And one more thing which I did not mention is ...this issue is
happening only with Adobe 7.0 (not with earlier versions).
Why not just redirect the webbrowser to "about:Blank" to free the PDF,
update the file, and then switch the url back to the file's location?

Thanks,

Seth Rowe

Jul 3 '07 #6
I know that.

But I just want to find out why is it not working only on a particular
system when it is working on all others.
Jul 4 '07 #7

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

Similar topics

9
by: Paul | last post by:
Hi, VB.NET is saying the file I am creating is in use by another process and won't complete its task of moving the file to the specified destination folder. Here is my code (the main bit...
4
by: Mountain Bikn' Guy | last post by:
I am having serious problems with the following IDE bug: Could not write to output file 'x.dll' -- 'The process cannot access the file because it is being used by another process. ' and BUG:...
2
by: Raed Sawalha | last post by:
Hello , I have windows service which do listening to specified directory using FileSystemWatcher , on Created Event and Get all the files in the directory using Directory.GetFiles function then...
4
by: Jerry | last post by:
I've inherited a system w/5 projects - I'll refer to them as P1 thru P5 - P5 being the executable... P1 has no dependents. P2 is dependant upon P1 P3 has no dependents. P4 is dependant upon P1,...
3
by: guoqi zheng | last post by:
Dear sir, There is an import tool on my web application, user can upload Ms Access file, the file is saved at a temp folder on the server. After the import is finished, for security reason, I...
2
by: Piyush | last post by:
Hi, I am getting the error "The process cannot access the file "C:\Documents and Settings\piyush\Desktop\200309181051.ktl" because it is being used by another process." when I try to open this...
0
by: chris | last post by:
In VB6.0 I was using API calls for checking that a process has finished and then continue with other steps: var_process_number = Shell("wzunzip.exe -o " & """" & fld_ZIP_file_name & """" & " " &...
0
by: imranabdulaziz | last post by:
Dear All, I am making web application using Asp.net C#(Visual Studio2005). And Sql server 2005 as a back End I generated local mode report but as there was no printing option available . I assign...
0
nightangel
by: nightangel | last post by:
Hi dude,what i was done in my application is uploading a image file to my server using FTP, it work great when pushing a file into the server path using FTP. The problem i met now is i need to do a...
3
by: gracepaul | last post by:
hi, i got an exception while i m trying to zip/unzip a database inside the serverfolder System.IO.IOException: The process cannot access the file...
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
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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: 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...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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....

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.