Microsoft KB Archive/238242

= BUG: OLE Automation Returns "Element not found" Error =

Article ID: 238242

Article Last Modified on 4/22/2003

-

APPLIES TO


 * Microsoft Visual SourceSafe 6.0 Standard Edition

-



This article was previously published under Q238242



SYMPTOMS
When you connect to Visual SourceSafe (VSS) using OLE Automation, the following error message appears:

Element not found.



RESOLUTION
The following two workarounds will resolve the problem described in the SYMPTOMS section:   Unregister the VSS 5.0 OLE Automation .dll and register the VSS 6.0 OLE Automation .dll using the following commands from a DOS prompt: regsvr32 /u  regsvr32   Use early binding instead of late binding (See the REFERENCES section for more information on early binding).



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.



MORE INFORMATION
This problem can exist in Visual Basic (VB), VBScript, WScript, or VC (if you use the Class Wizard to wrap the DLL). The problem only happens on computers that previously had SourceSafe 5.0 installed on them and then upgraded to SourceSafe 6.0.

Steps to Reproduce Behavior
 Create a new VB project.  Add a button to the form and type the following in the Click event of the button:

Dim objVSSDatabase Set objVSSDatabase = CreateObject("SourceSafe") objVSSDatabase.Open <"path to SourceSafe srcsafe.ini file\srcsafe.ini">,   <"login">, <"password"> </li> Run the program and click the button you just added.</li></ol>

<div class="references_section">