Microsoft KB Archive/843576

= Microsoft Project files opened with a Read lock from a server ASP page =

Article ID: 843576

Article Last Modified on 12/22/2006

-

APPLIES TO


 * Microsoft Office Project Professional 2003
 * Microsoft Office Project Standard 2003
 * Microsoft Project 2002 Standard Edition
 * Microsoft Project 2002 Professional Edition
 * Microsoft Project 2002 Standard Edition
 * Microsoft Project 2000 Standard Edition

-





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(&quot;ADODB.Connection&quot;) ConData.ConnectionString = &quot;Provider=Microsoft.Project.OLEDB.version_number;PROJECT NAME=c:\path\blank_project.mpp&quot; 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:

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 &quot;Applies to&quot; section.

Additional query words: Prj9 Prj10 Prj11 Prj2000 prj2002 prj2003

Keywords: kbaspobj kbprb kbpending kbado kbasp KB843576

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.