This article was previously published under Q157636
This article has been archived. It is offered "as is" and will no longer be updated.
This article describes how to setup a Visual FoxPro for Windows projectunder SourceCode Control so that it can be accessed by multiple users.
Run Visual SourceSafe Administrator. On the Tools menu, click Options. In the General tab of the "SourceSafe Options" dialog box, check the "Allow Multiple Checkouts" option and clear the "Use network name for automatic user log in" option if you are opening two sessions of SourceSafe on the same computer.
Add two new users in Visual SourceSafe: SCTST1 and SCTST2. Close the Visual SourceSafe Administrator.
Run the Visual SourceSafe Client and login as SCTST1. On the File menu, click Set Working Directory. Enter "..\SCTST1wd" as the working directory and click the "Create Dir" button to create the directory if it does not already exist. Close Visual SourceSafe.
Run Visual SourceSafe Client. Repeat step 3 above, but this time login in as SCTST2, and set the working directory to "..\SCTST2wd". Close Visual SourceSafe.
Run Visual FoxPro for Windows. On the Tools menu, click Options.
Select the Projects tab and set "Active Source Control Provider" to "Microsoft Visual SourceSafe."
Click on the "Set as Default" button, and close the Options dialog box.
Open the Tastrade project in "..\Vfp\Samples\Tastrade\."
On the Project menu, click "Add Project to Source Control." When prompted, log on to Visual SourceSafe as SCTST1.
NOTE: After being added to Source Control, the project and its componentsremain in the same directory, and a project meta file (.pjm) is added tothat directory. In the case of this example, the name of the .pjm file isTastrade.pjm. For more information on the project meta file, please referto the "Managing Visual FoxPro Projects Under Source Control" topic in the"Developing in Teams" chapter of the Visual FoxPro Developer's Guide.
After the project is added to source code control, start a second instance of Visual FoxPro for Windows on the same or different machine. If Visual SourceSafe is not set up as the active source control provider, follow steps 5, 6, and 7 above to do so.
On the File menu, click "Join Source Control Project." When prompted log on to Visual SourceSafe as SCTST2.
In the "Open SourceSafe Project" dialog box, select the Tastrade project. Click the Browse button from the "Open SourceSafe Project" dialog box. The "Browse Directory" dialog box appears. Locate the working directory. If the working directory does not exist, enter the directory name, "..\SCTST2wd" for example, and click the "Create Dir" button. Close the "Browse Directory" dialog box.
Select "Yes All" in all the dialog boxes that come up.
NOTE: The "Join Source Control Project" process copies the project and itscomponents, which were placed under Source Control, to the workingdirectory that is specified for the user(SCTST2) in Visual SourceSafe. Thisprocess also checks out a copy of the .pjm file (Tastrade.pjm) to theworking directory.
Close the project in both sessions of Visual FoxPro for Windows.
In the First Session of Visual FoxPro for Windows, open the Tastrade Project in the "..\Vfp\Samples\Tastrade\" directory.
In the second session of Visual FoxPro for Windows, open the Tastrade project in "...\SCTST2wd."
The user should be able to Check Out, Modify, and Check In files from both sessions of Visual FoxPro.
To update the Projects in each session, use the "Update Project List" option in the "Source Control" menu under the Project menu.
The user (SCTST1) who Added the project to source control may want to workon the project in a directory other than "..\Vfp\Samples\Tastrade\." Toallow this, repeat steps 11-12 with the following exceptions:
In step 11, log on to Visual SourceSafe as SCTST1.
In step 12, instead of selecting "..\SCTST2wd" as the working directory, select "..\SCTST1wd".
Visual FoxPro Online Developer's Guide, Developing in Teams chapter,"Managing Visual FoxPro Projects Under Source Control"