The Source Code Control Options

To work with the features supplied by the SCC provider and the SCC add-in for Access, go to the Source Control Ribbon tab. Because the database is already registered in an SCC project, all of the options on this tab should be enabled, except for the Add Database to SourceSafe for obvious reasons. When working with a database object, for actions such as checking out and checking in changes, click the object name in the Navigation pane and then click the desired action in the Ribbon. The Navigation pane is the interface for selecting database objects to use to work with in the Source Code Control program. Each of the available options for the SCC add-in is described in the following table.

SCC Option Description

Add database to SourceSafe Allows you to add the database open in Access to the source code-controlled database. If the current instance of the database is already checked into the SCC database, this option is disabled. The database must be checked into the SCC database before the source control options can be used for the objects of the application.

Create from SourceSafe Once a database application has been checked into an SCC data base, the database project can be restored using the Create from SourceSafe option. It closes the database that is currently open in the Access client, creates a new database based on the objects in the SCC database, and reopens the new database in the current instance of Access.

Note: A Create from SourceSafe option is available on the Office menu, which is added when the ADE is installed. When opening a new instance of Access without opening a specific database, a new database can be created from the SCC project by clicking this button on the Office menu. This is important to know because the Source Control Ribbon is not available when there are no databases open in the Access client.

Check In After a database object has been checked out and modified, you have to check the object back into the SCC project to version and propagate the changes to the object. To check in an object, simply select the object in the Navigation pane and click the Check In button in the Ribbon. (This option is also available in the context menu for the object in the Navigation pane.) The Check In Objects dialog box opens; it enables you to check in one, many, or all database objects that are checked out.

Check Out Before any change can be made to an object, a database object must be checked out of the SCC project. Fortunately, Access is smart enough to prompt you to do that automatically when you try to make changes to the object. To manually check out an object, select the database object in the Navigation pane and click the Check Out button on the Ribbon. This option is also available for the database objects context menu in the Navigation pane.

SCC Option

Description

Undo Check Out

The equivalent of a standard Revert code option. If a database object is checked out and, possibly, has modifications, Undo Check Out discards all of the current changes, restores the object to the current version in the SCC project, and marks the object as checked in. This can be used if changes are made that do not need to be saved in the project. It also can be used to ensure that the version of the database that the developer is working on is a version that was actually checked in to the SCC project.

Latest Version

Enables you to synchronize your database to the get all of the currently checked-in versions of the database objects. You have the option to get one, many, or all of the current project items. However, if any items in the project are already checked out, you can't get the latest version of them until the file is either checked-in to the project or the changes are reverted. This option is also available on the context menu for the database object in the Navigation pane.

Add Objects to SourceSafe

Some objects, such as modules, are not automatically added to the SCC project when they are saved. If a database object has been added, but has not ever been checked in to the SCC project, click Add Objects to SourceSafe to add the new database object to the project. This is the only way an object can be added to the SCC project if it is not automatically added when the object is created.

History

One of the more powerful features of any source code control program is the capability to see how previous versions of the object were structured and at which date and time. This can be useful if the recent changes to the object do not include some code or other information that was previously included in the database project. To view the history for an object, select the object in the Navigation pane and click the History button. The History Options dialog box opens; to see the full history, simply click OK. The full history of the changes displays in the History dialog box and you can view each version using the SCC program.

SourceSafe Properties

Describes some of the basic details about the object settings in the SCC database. The path to the object, type of object, and current status of the object are described here.

Share Objects

Used to share the current version of a project to create a new subproject or branched version of the project. If a branch of the project is created, changes made in one branch are not propagated to other branches or versions of the SCC project. This can be particularly helpful when trying to lock down changes made to a project for a specific release version, while still allowing changes to be made to the main project, without worrying about them affecting the locked down code.

Table continues on the next page

SCC Option

Description

Differences

Probably the most important feature included with any SCC program is the capability to view the differences between two objects in the SCC database. This is useful in analyzing changes and in comparing how objects have changed over time. To view the differences between two objects, select the object in the Navigation pane and click the Differences button. The Differences Options dialog box opens, and you can select which two files should be compared. This option is also available on the context menu for the database object in the Navigation pane.

Run SourceSafe

Enables you to invoke MS VSS from the instance of Access directly. This opens the SCC database for the current code project in the VSS Explorer window for you to gather data and make changes to.

Refresh Status

Updates the status of all of the objects in the SCC database. If new changes have been made from another user of the SCC project, those changes are propagated to the current instance of Access.

Options

Invokes the Source Code Control Options dialog box for the SCC add-in, which is explained next.

The Source Code Control Options dialog box enables you to set five basic options for the SCC add-in and it exposes an entry point into the SouceSafe Options dialog box. The five options allow the user to do the following:

□ Choose to automatically get the latest versions of objects when a database is checked in

□ Specify if the database objects should be automatically checked in when the database is closed

□ Specify if the objects should be added to the SCC database when they are created in Access

□ Automatically remove objects from the SCC database when they have been deleted in the Access client

□ Automatically get the updated status of all objects when the database is opened

Clicking the Advanced button on this dialog box provides you with some of the more granular options provided for the SCC add-in, via the SourceSafe Options dialog box. If you want to add a custom object editor for the SCC add-in, for example, it can be chosen from this SourceSafe Options dialog box. This dialog box also provides a few more options for the SCC database settings.

Even if a program other than Microsoft Visual SourceSafe 2005 is used, the options available should be similar to the items discussed here because the SCC must be registered as a Windows SCC provider.

Was this article helpful?

0 0

Post a comment