FIX: You cannot check in a stored procedure when multiple users have checked out the procedure in Visual SourceSafe 6.0c (814678)



The information in this article applies to:

  • Microsoft Visual SourceSafe 6.0c
  • Microsoft Visual Studio .NET (2003), Enterprise Architect Edition
  • Microsoft Visual Studio .NET (2003), Enterprise Developer Edition
  • Microsoft Visual Studio .NET (2003), Academic Edition
  • Microsoft Visual Studio .NET (2002), Professional Edition
  • Microsoft Visual Studio .NET (2002), Enterprise Architect Edition
  • Microsoft Visual Studio .NET (2002), Enterprise Developer Edition
  • Microsoft Visual Studio .NET (2002), Academic Edition

SYMPTOMS

This problem occurs in the following scenario:
  1. In the source control, multiple users check out a Microsoft SQL Server stored procedure at the same time.
  2. One user saves changes to the stored procedure.

    In Server Explorer of Microsoft Visual Studio .NET, the source control status for the stored procedure now indicates that the stored procedure is checked in.
  3. Another user tries to check in the stored procedure. However, the check-in process is not successful.
Note When you try to check out the stored procedure after another user has saved changes to it in the source control, you receive the following error message:
ADO error: SourceSafe: You currently have file File Name Checked out
Note The word "checked" is capitalized incorrectly in the error message.

WORKAROUND

To work around this problem, turn off the Allow multiple checkouts option in Microsoft Visual SourceSafe Administrator for the SourceSafe database. To do this, follow these steps:
  1. In Microsoft Visual SourceSafe, open Visual SourceSafe 6.0 Admin.
  2. On the Users menu, click Open SourceSafe Database, and then select the Visual SourceSafe database file.
  3. On the Tools menu, click Options.
  4. Click to clear the check box for Allow multiple checkouts.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

Steps to Reproduce the Behavior

  1. Turn on Allow multiple checkouts:
    1. In Microsoft Visual SourceSafe, open Visual SourceSafe 6.0 Admin.
    2. On the Users menu, click Open SourceSafe Database.
    3. Select a database, and then click OK.
    4. On the Tools menu, click Options.
    5. In SourceSafe Options, click to select the check box for Allow multiple checkouts.
    6. Click OK.
    7. Close Visual SourceSafe Administrator.
  2. Turn on version control:
    1. Start Visual Studio .NET.
    2. On the Tools menu, click Options.
    3. In the Options dialog box, click Database Tools, and then click Server Explorer.
    4. Under Stored Procedures, click to select the check box for Enable Version Control, and then click OK.
  3. Add your project to the source control:
    1. On the View menu, click Server Explorer.
    2. In Server Explorer, right-click Data Connections, and then click Add Connection.
    3. In Data Link Properties, type the name of your local computer that is running SQL Server in the Local SQL Server text box.
    4. For Database, click NorthWind, and then click OK.
    5. Expand Data Connections, and then expand your data connection.
    6. Right-click Stored Procedures, and then click Add to Source Control.
    7. Type your local source control database location, and then type storedproc in the Source control project name textbox. Click OK.
  4. Add your stored procedure to the source control, and then check out the stored procedure under your user name:
    1. In Source Control Login, type your User Name and Password for the source control database.
    2. In Server Explorer, expand Stored Procedures. Right-click SalesByCategory, and then click Add to Source Control.
    3. Right-click SalesByCategory, and then click Check Out.
  5. Check out your stored procedure by using a different user name and password:
    1. Start Microsoft Visual SourceSafe 6.0.
    2. In Visual SourceSafe Login, type a different User Name and Password. In Database, select the source control database where you created storedproc in step 3.
    3. In Visual SourceSafe Explorer, expand storedproc until you locate the SalesByCategory folder for the selected procedure. Right-click the SalesByCategory folder, and then click Check Out. Click OK.
  6. Change your stored procedure, and then check it in:
    1. In Set Working Folder, click a folder name, and then click OK. Type a comment. Click OK.
    2. In Microsoft Visual SourceSafe, click Yes.

      You may notice that the file is checked in two times.
  7. Try to check in the stored procedure again:
    1. In Server Explorer, open SalesByCategory.
    2. On the File menu, click Save SalesByCategory.
    3. You may notice that the icon is changed from a check-in icon to a lock icon. Close the code editor, and then right-click SalesByCategory in Server Explorer. The Check Out command is available. However, when you click Check Out, you receive the error message that appears in the "Symptoms" section. You may also notice that Check In and Undo Check Out are not available in Server Explorer.

REFERENCES

For more information, visit the following Microsoft Developer Network (MSDN) Web site:

Modification Type:MinorLast Reviewed:8/26/2005
Keywords:kbvs2002sp1sweep kberrmsg kbUser kbStoredProc kbSrcControl kbbug KB814678 kbAudDeveloper