iworkspace只有打开 personal geodatabase(.mdb),没有关闭(没找到),所以打开了想删除就会提示,
所以用以下方法:
代码
public
static
void
DeleteMdb()
{
if (_workSpaceInstance != null )
{
IDataset sourceWorkspaceDataset = (IDataset)_workSpaceInstance;
sourceWorkspaceDataset.Delete();
}
}
{
if (_workSpaceInstance != null )
{
IDataset sourceWorkspaceDataset = (IDataset)_workSpaceInstance;
sourceWorkspaceDataset.Delete();
}
}