?
Solved

User Group Within VB

Posted on 2003-03-23
1
Medium Priority
?
172 Views
Last Modified: 2010-08-05
I am connecting to an Access database (Survery.MDB) using a security database (Survey.MDW).  This is done using ADO 2.6.  However I want to implement user level security within the VB program itself.  I.e.  Create, delete users, change user passwords, change user groups, etc.  I am not quite sure how to do this.  I know that using DAO 3.6, I can access user groups and User names, but that is for a workspace.

MSDN:
"
ACC2: Only Admins Group Members Can List Groups They Belong To
Q124240

  Function GetGroups ()
   Dim W As WorkSpace, US As String, U As User, i As Integer, j As Integer

      Set W = DBEngine.Workspaces(0)
      US = CurrentUser()
      Set U = W.Users(US)

      Debug.Print U.Name
      For j = 0 To U.Groups.Count - 1
         Debug.Print "   " & U(j).Name
      Next

   End Function
}

I am wondering how I can set the workspace to point to a specific database.

ie.
W.OpenDatase "C:\Survey.MDB", , , "Jet OLEDB:System database=""C:\Survey.MDB"""

but this does not show all the users in that database.  What is wrong with this?
0
Comment
Question by:supunr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 120 total points
ID: 8194153
ADOX is the part of ADO which deals with schemas and security.

This article gives you a good overview:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndao/html/daotoadoupdate_topic2.asp

You have to add a reference in your project to something like:

Microsoft ADO. Ext 2.5 for DDL and Security
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month11 days, 2 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question