Hi Folks,
I have a secured access 97 database with three user groups set up - Admins, Users and SparkAdmins. The owner is me (GTAYLOR) and I am a member of the Admins Group.
At present, all three user groups have full access for every object in the database until I resolve the problem that I'm about to explain.
The database is associated to a workgroup (sspark.mdw) via the /wrkgrp command line switch in the shortcut. My PC is not joined to the workgroup.
Using the MS Access "User and Group Accounts..." functionality, I can quite easily add / delete users and groups. The performance of this part is exactly as I expect.
I have a form which should allow users to add new users to the system by typing the new username in a textbox and selecting the group from a drop-down menu.
The code behind the form is as follows:
When this code is executed, I get "Error 3358 - Cant't read the workgroup information file" at the line I have marked with asterisks. I am logged in as GTAYLOR at the time (the owner - see above)
On further analysis, I have also found the following:
DBEngine.SystemDB is "system.mdb" (not a typo!)
DBEngine.Workspaces(0).Groups.Count is 0
DBEngine.Workspaces(0).Users.Count is 0
DBEngine.UserName and Workspaces(0).UserName are both shown as "admin"
When setting up the security, I followed word-for-word the steps laid out on the Microsoft web-site.
As always, any help would by greatly appreciated!
Graeme
website:
I have a secured access 97 database with three user groups set up - Admins, Users and SparkAdmins. The owner is me (GTAYLOR) and I am a member of the Admins Group.
At present, all three user groups have full access for every object in the database until I resolve the problem that I'm about to explain.
The database is associated to a workgroup (sspark.mdw) via the /wrkgrp command line switch in the shortcut. My PC is not joined to the workgroup.
Using the MS Access "User and Group Accounts..." functionality, I can quite easily add / delete users and groups. The performance of this part is exactly as I expect.
I have a form which should allow users to add new users to the system by typing the new username in a textbox and selecting the group from a drop-down menu.
The code behind the form is as follows:
Code:
Dim owrk As DAO.Workspace
Dim ouser As DAO.User
Dim ogroup As DAO.Group
Dim strPassword As String
If ((Len(Me.txtLogin) = 0) Or (Len(Me.cboGroup) = 0)) Then
MsgBox "Please specify login and group!"
Else
Set owrk = DBEngine.Workspaces(0)
Set ouser = owrk.CreateUser(Me.txtLogin, Me.txtLogin & "_PID", "")
owrk.Users.Append ouser '*****
Set ogroup = ouser.CreateGroup(Me.cboGroup)
ouser.Groups.Append ogroup
End If
When this code is executed, I get "Error 3358 - Cant't read the workgroup information file" at the line I have marked with asterisks. I am logged in as GTAYLOR at the time (the owner - see above)
On further analysis, I have also found the following:
DBEngine.SystemDB is "system.mdb" (not a typo!)
DBEngine.Workspaces(0).Groups.Count is 0
DBEngine.Workspaces(0).Users.Count is 0
DBEngine.UserName and Workspaces(0).UserName are both shown as "admin"
When setting up the security, I followed word-for-word the steps laid out on the Microsoft web-site.
As always, any help would by greatly appreciated!
Graeme
website: