Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

User Group Within VB

Posted on 2003-03-23
1
Medium Priority
?
173 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
1 Comment
 
LVL 77

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

571 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