Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 843576 - Last Review: December 22, 2006 - Revision: 4.4
Microsoft Project files opened with a Read lock from a server ASP page
SYMPTOMS
When you try to rename or try to move a Microsoft Project
project file (*.mpp) that is in a network share or on your local hard
disk drive, you may receive a sharing violation error
message. Additionally, when you open the project file, changes that you made to the file
are missing.
If you view open connections for the
server or the
computer
where the project file is shared from,
the project file is listed with a live connection to a user, even though the
file may not be in use by that user.
CAUSE
This problem may occur if you use the ConData object in a
script from an ASP page to load a Microsoft Project *.mpp project file with the
following ADO Provider connection string:
Provider=Microsoft.Project.OLEDB.version_number;PROJECT NAME=Project_Path_File_Name.mpp
When the *.mpp file is loaded and is served out by using this ADO
Provider connection string, the file is opened in Read mode and a Read lock is
set on the file on the server. This Read lock will remain active until another
project file is loaded with the same connection method, or until you unload the
ADO Provider. When the server provides the new project file, the Read lock is
removed from first project file.
WORKAROUND
To work around this problem, follow these steps in the order
that they appear:
- Create a blank *.mpp project file.
- Save the file on the server.
- Modify the original script on the ASP page.
- Add the follow code after the first ConData object
allocation:
Set ConData = Server.CreateObject("ADODB.Connection")
ConData.ConnectionString = "Provider=Microsoft.Project.OLEDB.version_number;PROJECT NAME=c:\path\blank_project.mpp"
ConData.Open
ConData.Close
Set ConData = Nothing
After you run the code, the original *.mpp project file that was
locked is released and the lock remains on the blank *.mpp project file.
MORE INFORMATION
The provider supports three registry entries
that determine the number of seconds that must elapse before certain time-out
conditions occur. These registry entries
can be found under the following subkey:
HKEY_LOCAL_MACHINE\Software\Microsoft\Office\<version_#>.0\MS Project\OLE
DB Provider
Entry Name: TimeoutOnLoad
Type: DWORD
Value: Time in seconds the provider will try to load a project before
returning an error message that the project is unavailable. Default value is 90
seconds.
Entry Name: TimeBeforeUnload
Type: DWORD
Value: Time in seconds the project remains open after another project
is loaded. Until a new project is loaded, the current project remains in
memory, regardless of this setting. Default value is 600 seconds.
Entry Name: TimeBeforeRefresh
Type: DWORD
Value: Time in seconds before the current project is checked for
updated information. Default value is 1 second.
If you set any one of
these entries to zero, the features of that entry are turned off. If you set
the TimeBeforeUnload entry to zero,
the workaround that is described in this article does not work. If you set the TimeBeforeUnload entry to a low
value, less than 60 seconds, a high load situation may occur as the provider
will constantly reload projects.
STATUS
Microsoft
has confirmed that this is a problem in the Microsoft products that are listed
in the "Applies to" section.
APPLIES TO
- Microsoft Office Project Professional 2003
- Microsoft Office Project Standard 2003
- Microsoft Project 2002 Standard Edition
- Microsoft Project 2002 Professional Edition
- Microsoft Project Standard 2002
- Microsoft Project 2000 Standard Edition
| kbprb kbaspobj kbasp kbado kbpending KB843576 |
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate
Be the first to leave feedback, to help others about this knowledge base
article.
(Optional) Name
(Optional)
Public URL Or Email
Comments
No
HTML -- Text Only Please