This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IW > IWorkspaceDomains Interface > IWorkspaceDomains.DeleteDomain Method (ArcObjects .NET 10.4 SDK) |
Deletes the given domain from the workspace.
[Visual Basic .NET] Public Sub DeleteDomain ( _ ByVal DomainName As String _ )
[C#] public void DeleteDomain ( string DomainName );
[C++]
HRESULT DeleteDomain(
BSTR DomainName
);
[C++]
Parameters DomainName [in] DomainName is a parameter of type BSTR
FDO_E_DOMAIN_USED_AS_DEFAULT_DOMAIN: The domain is associated with a field as the default domain. Remove the association with the IClassSchemaEdit::AlterDomain method.
This method will delete a domain from the workspace. For DeleteDomain to execute successfully, you must be connected to the workspace as the user who created the domain you are deleting, and the domain must not be in use by any object classes in the database. Use the CanDeleteDomain property to determine if a domain can be deleted. To unassociate a domain with a field, use the IClassSchemaEdit::AlterDomain method.