Microsoft Knowledge Base Email Alertz

KBAlertz.com: (843576) - Discusses the problem where Microsoft Project files that are opened from an ASP page by using the ConData object are opened with a Read lock and cannot be moved, copied, or renamed on the server.

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]

Search KbAlertz

Advanced Search

Webmasters
Put kbAlertz on your website.
[ Click Here for more! ]





ASP.NET 3.5 Web Hosting with Windows 2008 and SQL 2008: Click Here!
Discount ASP.NET Hosting
ASP.NET 2.0 and 3.5
Windows2008 and SQL2008
US and UK Hosting
The ad says 3 - but KBAlertz referrals get
** SIX MONTHS FREE **


Bug Tracking Software
For bug tracking software or defect tracking software or issue tracking software, visit Axosoft.


Community Site



We Send hundreds of thousands of emails using ASP.NET Email



Expert Web Design & Graphic Design
Design44.com

ASP.NET 3.5 Web Hosting with Windows 2008 and SQL 2008: Click Here!
Discount ASP.NET Hosting
ASP.NET 2.0 and 3.5
Windows2008 and SQL2008
US and UK Hosting
The ad says 3 - but KBAlertz referrals get
** SIX MONTHS FREE **




Mentioned In








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:
  1. Create a blank *.mpp project file.
  2. Save the file on the server.
  3. Modify the original script on the ASP page.
  4. 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
Keywords: 
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