IDataLayer fails in changing login info for a RasterLayer.
上次发布: February 14, 2015No Product Found
漏洞 ID 编号
NIM058287
已提交
June 14, 2010
上次修改时间
April 2, 2025
适用范围
No Product Found
找到的版本
9.3.1
编程语言
C#
状态
Will Not Be Addressed
开发团队已考虑过该问题或请求,并决定不会解决该问题。 问题的“其他信息”部分可能包含进一步说明。
附加信息
We apologize that we were unable to address this issue within the current product support cycle. If the issue continues to affect your work in a supported release, please contact Technical Support.
解决办法
Instead of changing the connection parameters in IDataLayer.DatasourceName for changing the workspace, the new raster / raster catalog is opened from the new Workspace with IRasterWorkspaceEx.OpenRasterDataset(<a href="http://oldDatasetName.Name" target="_blank">oldDatasetName.Name</a>) or IRasterWorkspaceEx.OpenRasterCatalog(<a href="http://oldDatasetName.Name" target="_blank">oldDatasetName.Name</a>). The return value is used to set IDataLayer.DatasourceName.private static void SpecialTreatmentForRasterData(ref IDatasetName datasetName){ IRasterWorkspaceEx newWorkspaceAsRasterWorkspaceEx = ((IName)datasetName.WorkspaceName).Open() as IRasterWorkspaceEx; if (newWorkspaceAsRasterWorkspaceEx != null && (datasetName.Type == esriDatasetType.esriDTRasterDataset || datasetName.Type == esriDatasetType.esriDTRasterCatalog)) { IDataset newDataset = datasetName.Type == esriDatasetType.esriDTRasterDataset ? (IDataset)newWorkspaceAsRasterWorkspaceEx.OpenRasterDataset(<a href="http://datasetName.Name" target="_blank">datasetName.Name</a>) : (IDataset)newWorkspaceAsRasterWorkspaceEx.OpenRasterCatalog(<a href="http://datasetName.Name" target="_blank">datasetName.Name</a>); datasetName = (IDatasetName)newDataset.FullName; }}