BUG: Checking Out .VBP Overwrites Unsaved Changes in Project

Last reviewed: December 23, 1996
Article ID: Q156878
The information in this article applies to:
  • Microsoft Visual SourceSafe, 16-bit and 32-bit, for Windows 4.0, 4.0a, 5.0
  • Microsoft Visual Basic Enterprise Edition, 16-bit and 32-bit, for Windows 4.0

SYMPTOMS

If you have checked out and modified files from a project that is under SourceSafe control without checking out the .VBP file, unsaved changes to those files will be erased without warning if you then check out the .VBP.

WORKAROUND

Either checkout the VBP file before modifying any file in the project or save all modified files in the project before checking out the VBP file.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Steps to Reproduce Problem

Steps 1-5 can be omitted if you already have a Visual Basic project under SourceSafe control with all files checked in.

  1. Start Visual Basic 4.0. A default project is created.

  2. Save the project, form1.frm & project1.vbp, in a new directory such as C:\temp\testme.

  3. Click Yes in the messagebox asking you if the project should be added to SourceCode control.

  4. Click Create in the Add SourceSafe Project dialog, then click Yes when prompted to create the project. The default name is Project1.

  5. Add both files to the SourceSafe project in the Add to SourceSafe dialog. By default, both files are now checked in. In the Visual Basic 4.0 project window, form1.frm is now correctly marked as read-only.

  6. In the Visual Basic 4.0 project window, right-click the line containing form1.frm, and invoke the Check Out command.

  7. In the Check Out File(s) from Source Safe dialog, only form1.frm is selected. Click OK to check out only form1.frm. Do not check out project1.vbp. The bitmap in the Visual Basic 4.0 project window now shows that form1.frm is checked out.

  8. Click View Form in the Visual Basic project window and make some changes to the form, such as placing a Command button on the form.

  9. Right-click again on form1.frm in the Visual Basic 4.0 project window, and choose the Check Out command. You will find only project1.vbp in the list of Files to be checked out. Select the file and check it out. Note that Form1.frm is replaced by its previous version without any warning.

The same behavior, such as unsaved changes being overwritten, will happen to any component in the project when the VBP file is checked out.


KBCategory: kbinterop kbbuglist
KBSubcategory: ssvb
Additional reference words: 4.00 4.00a 5.00 module kbdss



THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: December 23, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.