laptop and a wrench

Error

ISqlPrivilege::Grant throws an automation error.

Última publicación: September 8, 2016 No Product Found
Número de ID del error NIM012201
EnviadoOctober 8, 2007
Última modificaciónJune 5, 2024
Relacionado conNo Product Found
Versión encontrada9.2
EstadoNon-Reproducible

Información adicional

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

Solución alternativa

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

Pasos para reproducir

ID del error: NIM012201

Software:

  • No Product Found

Recibir notificaciones cuando cambie el estado de un error

Descargar la aplicación de soporte de Esri

Descubrir más sobre este tema

Obtener ayuda de expertos en ArcGIS

Contactar con el soporte técnico

Descargar la aplicación de soporte de Esri

Ir a opciones de descarga