Changing privileges for a RasterDataset using ISQLPrivilege::Grant returns an Automation Error.
上次发布: August 25, 2014No Product Found
漏洞 ID 编号
NIM004186
已提交
September 13, 2006
上次修改时间
June 5, 2024
适用范围
No Product Found
找到的版本
9.1
状态
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.
解决办法
You can work around this problem by using the code given below:Public Sub GrantPrivilege(pDataset As IDataset, pUserName As String, pPriv As Long, pWithGrant As Boolean) If Not pDataset Is Nothing Then Dim pSQLPrivilege As ISQLPrivilege If pDataset.Type = esriDTRasterDataset Then Dim pTable As ITable Dim pFeatWork As IFeatureWorkspace Dim pTableName As ITableName Set pFeatWork = pDataset.workspace Set pTable = pFeatWork.OpenTable(<a href="http://pDataset.Name" target="_blank">pDataset.Name</a>) Dim prDataset As IDataset Set prDataset = pTable Set pSQLPrivilege = prDataset.FullName pSQLPrivilege.Grant pUserName, pPriv, pWithGrant End If End If End Sub