Microsoft KB Archive/305162

= OFFXPDEV: Error When You Open a Code Librarian File =

Article ID: 305162

Article Last Modified on 2/12/2007

-

APPLIES TO


 * Microsoft Office XP Developer Edition

-



This article was previously published under Q305162



IMPORTANT: This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry



SYMPTOMS
When you try to open a Code Librarian file (.clb) from one of the following programs, you receive one of the following error messages:  Opening Code Librarian:

Unable to open the selected file. Please select a valid code librarian (.CLB) file.

 Opening Code Librarian Viewer:

An error has occurred loading the library requested.





CAUSE
The SystemDB value under the following registry key refers to a secured workgroup information file (.mdw) that requires a password for the Admin user:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines



RESOLUTION
Both of the Code Librarian programs use the registry value that is mentioned in the &quot;Cause&quot; section to determine which workgroup information file to use when opening a CLB file. Because of this, either the System.mdb file or the path to a non-secured MDW file must be specified. There is no method for supplying a password for use with a secured workgroup information file.

To modify the registry key to contain an appropriate value, follow these steps.

WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

 Start Registry Editor (Regedit.exe). Locate the SystemDB value under the following registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines

 Write down the current value in this registry key. That way, you will know the value if you need it again.</li> On the Edit menu, click Modify, type system.mdb, and then click OK.</li> Quit Registry Editor.</li></ol>

Code Librarian and Code Librarian Viewer should now open without error.

<div class="moreinformation_section">

MORE INFORMATION
A common reason to specify a secured MDW file in the SystemDB registry value is so that secured MDB files can be linked to servers within SQL Server. This is documented in the following article:

246255 HOWTO: Use a SQL Server 7.0 Distributed Query with a Linked Server to Secured Access Databases

Steps to reproduce the behavior
<ol> Install Microsoft Office XP Developer (including Code Librarian).</li> Create a secured MDW file with a password for the Admin user.</li> Modify the SystemDB value under the following registry key to contain the path to the secured MDW file that you created in step 2:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines

</li> Open Code Librarian.</li> If you do not receive the error on startup because you have not yet designated a default library, open the Codelib.clb file, as follow: <ol style="list-style-type: lower-alpha;"> On the Code Librarian menu, point to Add, and then click Existing Library.</li> In the Open dialog box, locate and click the Codelib.clb file.</li> Click Open.</li></ol>

Note that you receive the error message that is mentioned in the &quot;Symptoms&quot; section of this article.</li></ol>

<div class="references_section">