Read Database (itself) permissions

A

Aragorn2004

Hallo, i would read the permissions for a particular user for database itself
in Access 2002.

How suggested by MSDN Site resources I set the Name argument to Null and
set the ObjectType argument to adPermObjDatabase.

But i receive an error "object invalid or unknown to provider".

The code is

Dim catDb As ADOX.Catalog
Dim usrPerms As ADOX.User
Dim grpPerms As ADOX.Group
Dim lngPerms As Long
Dim objTable As Access.AccessObject

Set catDb = New ADOX.Catalog
With catDb
.ActiveConnection = CurrentProject.Connection
For Each usrPerms In .Users
lngPerms = .Users(usrPerms.Name).GetPermissions(Null,
adPermObjDatabase)

For Each objTable In CurrentData.AllTables
If Left(objTable.Name, 4) <> "MSys" Then
lngPerms =
..Users(usrPerms.Name).GetPermissions(objTable.Name, adPermObjTable)
End If
Next objTable
next

end with

What's wrong ?

Thanks in advance ?

Aragorn
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top