Microsoft KB Archive/814678

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

Article ID: 814678

Article Last Modified on 5/31/2007

-

APPLIES TO


 * Microsoft Visual SourceSafe 6.0C
 * Microsoft Visual Studio .NET 2003 Enterprise Architect
 * Microsoft Visual Studio .NET 2003 Enterprise Developer
 * Microsoft Visual Studio .NET 2003 Academic Edition
 * Microsoft Visual Studio .NET 2002 Professional Edition
 * Microsoft Visual Studio .NET 2002 Enterprise Architect
 * Microsoft Visual Studio .NET 2002 Enterprise Developer
 * 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.
 * 1) 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  Checked out

Note The word &quot;checked&quot; 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 &quot;Applies to&quot; section.



Steps to Reproduce the Behavior
 Turn on Allow multiple checkouts:  In Microsoft Visual SourceSafe, open Visual SourceSafe 6.0 Admin. On the Users menu, click Open SourceSafe Database. Select a database, and then click OK. On the Tools menu, click Options. In SourceSafe Options, click to select the check box for Allow multiple checkouts.</li> Click OK.</li> Close Visual SourceSafe Administrator.</li></ol> </li> Turn on version control: <ol style="list-style-type: lower-alpha;"> Start Visual Studio .NET.</li> On the Tools menu, click Options.</li> In the Options dialog box, click Database Tools, and then click Server Explorer.</li> Under Stored Procedures, click to select the check box for Enable Version Control, and then click OK.</li></ol> </li> Add your project to the source control: <ol style="list-style-type: lower-alpha;"> On the View menu, click Server Explorer.</li> In Server Explorer, right-click Data Connections, and then click Add Connection.</li> In Data Link Properties, type the name of your local computer that is running SQL Server in the Local SQL Server text box.</li> For Database, click NorthWind, and then click OK.</li> Expand Data Connections, and then expand your data connection.</li> Right-click Stored Procedures, and then click Add to Source Control.</li> Type your local source control database location, and then type storedproc in the Source control project name textbox. Click OK.</li></ol> </li> Add your stored procedure to the source control, and then check out the stored procedure under your user name: <ol style="list-style-type: lower-alpha;"> <li>In Source Control Login, type your User Name and Password for the source control database.</li> <li>In Server Explorer, expand Stored Procedures. Right-click SalesByCategory, and then click Add to Source Control.</li> <li>Right-click SalesByCategory, and then click Check Out.</li></ol> </li> <li>Check out your stored procedure by using a different user name and password: <ol style="list-style-type: lower-alpha;"> <li>Start Microsoft Visual SourceSafe 6.0.</li> <li>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.</li> <li>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.</li></ol> </li> <li>Change your stored procedure, and then check it in: <ol style="list-style-type: lower-alpha;"> <li>In Set Working Folder, click a folder name, and then click OK. Type a comment. Click OK.</li> <li>In Microsoft Visual SourceSafe, click Yes.

You may notice that the file is checked in two times.</li></ol> </li> <li>Try to check in the stored procedure again: <ol style="list-style-type: lower-alpha;"> <li>In Server Explorer, open SalesByCategory.</li> <li>On the File menu, click Save SalesByCategory.</li> <li>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 &quot;Symptoms&quot; section. You may also notice that Check In and Undo Check Out are not available in Server Explorer.</li></ol> </li></ol>

<div class="references_section">