Managing Solutions with Source Control
After completing the previous topic, you have a solution called StatusCheck that you can manage with a source control product. The following practice reviews the basic operation of SQL Server Management Studio and Visual SourceSafe. Management Studio works with other source control providers, but to complete this practice as written, you must have Visual SourceSafe installed.
Using Visual SourceSafe with Solutions
To check a solution into Visual SourceSafe
In Solution Explorer, right-click Solution 'StatusCheck' (1 project), and then click Add Solution to Source Control.
In the Visual SourceSafe Login dialog box, complete the Username, Password, and Database text boxes, and then click OK.
In the Add to SourceSafe Project dialog box, navigate to the folder where you wish to save the solution, and then click OK.
You are asked if you wish to create the folder. Click Yes.
In Management Studio, the Pending Checkins component is added to the display surface. If Pending Checkins was explicitly closed earlier, it may not display automatically. In that case, on the View menu, click Pending Checkins. Note that Pending Checkins has no information displayed in the body of the window: the solution was checked in when you added it, so there are no files currently checked out.
Click in Query Editor, and add a new line and the word GO to the bottom of the script. Note that Pending Checkins automatically checks out the file and its containing solution and script project.
Close the Pending Checkins component, as you might typically do to regain space in Management Studio.
In Solution Explorer, right-click the Check Workorders.sql query, and then click View Pending Checkins. Pending Checkins appears again to remind you of the scripts you have modified, but not checked in.
In Solution Explorer, right-click the Check Workorders.sql query, and then click Check In. The Check In dialog box opens. Select which items will be checked in, and add a comment describing your change.
Click Check In to check in the files, and clear Pending Checkins.
Configuring Visual SourceSafe
Visual SourceSafe integrates well with Management Studio, but you can change your version control product and configure some of the features directly from Management Studio.
To configure Visual SourceSafe options
On the Tools menu, click Options.
Expand the Source Control node.
Set the properties on each page of the node to support your working style.
Next Task in Lesson