1、VersionedWorkspace类及其接口:
A VersionedWorkspace is a Workspace that supports multiuser editing and multiple representations of features classes and tables in a relational database system. VersionedWorkspaces support the IVersionedWorkspace interface.
VersionedWorkspace类是Workspace类的一个子类,在关系数据库系统中,它允许多用户编辑以及要素类及数据表多样化的表达。它向用户提供了IVersionedWorkspace接口。
A list of all versions to which the user has permissions can be retrieved using the Versions property. The versions returned are either owned by the connected user or have public access.
通过IVersionedWorkspace接口提供的Versions的属性,用户可以得到授予他们访问权限的VersionedWorkspace中的所有版本。
通过Versions属性得到的对象是一个枚举型变量——EnumVersionInfo。
通过IVersionedWorkspace接口提供的FindVersion方法,用户可以通过版本名称进行查找而得到该版本。
The IVersion interface is used to manage the properties of a version as well as create new versions. Creating a new version requires an existing version to be the parent of the new version. When the new version is created, the parent and child versions are identical。
IVersion接口向用户提供了创建及管理版本属性的功能。创建一个新版本要求一个已经存在的版本作为其父版本。当新版本被创建时,版本之间的关系(父与子)也就被确立了。
下面是更新版本属性的C#代码示例:
//假设你已经得到dataset的引用
IVersion version = (IVersion)dataset.Workspace;
IVersionInfo versionInfo = version.VersionInfo;
if(versionInfo.IsOwner)
{
version.Access = esriVersionAccess.esriVersionAccessPublic;
}
2、DataSet
