laptop and a wrench

漏洞

ISqlPrivilege::Grant throws an automation error.

上次发布: September 8, 2016 No Product Found
漏洞 ID 编号 NIM012201
已提交October 8, 2007
上次修改时间June 5, 2024
适用范围No Product Found
找到的版本9.2
状态Non-Reproducible

附加信息

Not reproducible in the latest build. If you are still encountering this issue, please contact Esri Technical Support.

解决办法

Get an IName object from IDataSet::FullName. This is the key. Public Sub Works() ''***********Change these variables: ''location of SDE file... Dim strSDEFile As String strSDEFile = "C:\Documents and Settings\shawn\Application Data\ESRI\ArcCatalog\9.3-Oracle-csc-lab5.sde" '***********you need to change the variable strDS: ''dataset name we are working on: ''dataset name Dim strDS As String strDS = "SDE.cdc" ''***********you need to change the variable strLogin: ''the user whose permission you want to GRANT Dim strLogin As String strLogin = "joe" ''**********NO NEED TO CHANGE ANYTHING ELSE********************* Dim wrkSpaceFac As IWorkspaceFactory Set wrkSpaceFac = New SdeWorkspaceFactory Dim wrkSpace As IWorkspace ''This is my connection as "SDE" Set wrkSpace = wrkSpaceFac.OpenFromFile(strSDEFile, 0) Dim fcWrkSpace As IFeatureWorkspace Set fcWrkSpace = wrkSpace Dim ds As IDataset Set ds = fcWrkSpace.OpenFeatureClass(strDS) Debug.Print ds.Name ''THIS WAS THE KEY FOR ME.... Dim sqlPrivi As ISQLPrivilege Set sqlPrivi = ds.FullName Debug.Print sqlPrivi.SQLPrivileges sqlPrivi.Grant strLogin, 15, True MsgBox ("success") End Sub

重现步骤

漏洞 ID: NIM012201

软件:

  • No Product Found

当漏洞状态发生变化时获得通知

下载 Esri 支持应用程序

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项