can anyone please tell me the query SYNTAX for retrieving the users and groups as well as the passwords stored in an MDW file and be put into a listview.. there's none in ADODB..
: can anyone please tell me the query SYNTAX for retrieving the users and groups as well as the passwords stored in an MDW file and be put into a listview.. : there's none in ADODB.. : : : VB6/MS Access 2003 is used.. : : thanks.. : :
This is old code I had from Access 2.0, it works for Access 2002 but there's probably a better way to do this. anyway, may be what you need.
[code] Function ListAllObjs() As Integer Dim DefaultWorkspace As Workspace Dim CurrentDatabase As Database Dim MyContainer As Container, MyDocument As Document Dim I As Integer, J As Integer Set DefaultWorkspace = DBEngine.Workspaces(0) Set CurrentDatabase = DefaultWorkspace.Databases(0) For J = 0 To CurrentDatabase.Containers.Count - 1 Set MyContainer = CurrentDatabase.Containers(J) Debug.Print ">> Container: "; MyContainer.Name; Debug.Print " Owner: "; MyContainer.Owner Debug.Print " UserName: "; MyContainer.UserName; Debug.Print " Permissions: "; MyContainer.Permissions Debug.Print For I = 0 To MyContainer.Documents.Count - 1 Set MyDocument = MyContainer.Documents(I) Debug.Print " > Document: "; MyDocument.Name; Debug.Print " Owner: "; MyDocument.Owner; Debug.Print " Container: "; MyDocument.Container Debug.Print " UserName: "; MyDocument.UserName; Debug.Print " Permissions: "; MyDocument.Permissions Debug.Print " DateCreated: "; MyDocument.DateCreated; Debug.Print " LastUpdated: "; MyDocument.LastUpdated Debug.Print Next I
Next J EnumerateDocuments = True End Function [/code]
: can anyone please tell me the query SYNTAX for retrieving the users and groups as well as the passwords stored in an MDW file and be put into a listview.. : there's none in ADODB.. : : : VB6/MS Access 2003 is used.. : : thanks..
I think that you should use ADOX (Microsoft ADO Ext. for DDL and Security), to get those info; the library should be pretty straightforward - and, to be honest, I only used it once a few years ago, so I don't know much about it. Still, I just checked and noticed that the "User" object has no "password" property... but there's a "Properties" collection in it; perhaps it's in there. I don't know, but for what's worth, you might as well check out that library.
Comments
: there's none in ADODB..
:
:
: VB6/MS Access 2003 is used..
:
: thanks..
:
:
This is old code I had from Access 2.0, it works for Access 2002 but there's probably a better way to do this. anyway, may be what you need.
[code]
Function ListAllObjs() As Integer
Dim DefaultWorkspace As Workspace
Dim CurrentDatabase As Database
Dim MyContainer As Container, MyDocument As Document
Dim I As Integer, J As Integer
Set DefaultWorkspace = DBEngine.Workspaces(0)
Set CurrentDatabase = DefaultWorkspace.Databases(0)
For J = 0 To CurrentDatabase.Containers.Count - 1
Set MyContainer = CurrentDatabase.Containers(J)
Debug.Print ">> Container: "; MyContainer.Name;
Debug.Print " Owner: "; MyContainer.Owner
Debug.Print " UserName: "; MyContainer.UserName;
Debug.Print " Permissions: "; MyContainer.Permissions
Debug.Print
For I = 0 To MyContainer.Documents.Count - 1
Set MyDocument = MyContainer.Documents(I)
Debug.Print " > Document: "; MyDocument.Name;
Debug.Print " Owner: "; MyDocument.Owner;
Debug.Print " Container: "; MyDocument.Container
Debug.Print " UserName: "; MyDocument.UserName;
Debug.Print " Permissions: "; MyDocument.Permissions
Debug.Print " DateCreated: "; MyDocument.DateCreated;
Debug.Print " LastUpdated: "; MyDocument.LastUpdated
Debug.Print
Next I
Next J
EnumerateDocuments = True
End Function
[/code]
: there's none in ADODB..
:
:
: VB6/MS Access 2003 is used..
:
: thanks..
I think that you should use ADOX (Microsoft ADO Ext. for DDL and Security), to get those info; the library should be pretty straightforward - and, to be honest, I only used it once a few years ago, so I don't know much about it.
Still, I just checked and noticed that the "User" object has no "password" property... but there's a "Properties" collection in it; perhaps it's in there. I don't know, but for what's worth, you might as well check out that library.