Splitting a database & permissions

G

Guest

I split my secure database into a BE/FE but now I lose all my permissions to
my tables. Is this normal or am I doing something wrong?
 
P

Pieter Wijnen

I shouldn't think so
My way has however always been

Sub FixRights
Dim Ws AS DAO.WorkSpace
Dim CDb AS DAO.Database, BeDb AS DAO.Database
Dim CCont AS DAO.Container, BECont AS DAO.Container
Dim CDoc AS DAO.Document, BEDoc As DAO.Document
Dim Grp AS DAO.Group ' Assume rights assigned to groups - not users

On Error Resume Next ' No Error handling

Set Ws = Access.DbEngine.Workspaces(0)
Set Cdb = Access.CurrentDb()
Set BEDb = Access.OpenDatabase("BackEnd") ' Substitute..................
For Each CCont In Cdb.Containers
Set BECont = BEDb.Containers(CCont.Name)
For Each CDoc In CCont.Document
Set BEDoc = BECont.Documents(CDoc.Name)
For Each Grp In Ws.Groups
CDoc.UserName = Grp.Name
BEDoc.UserName = CDoc.UserName
CDoc.Permissions = BEDoc.Permissions
Next
Next
Next
' Clean up Objects here ..

End Sub

Pieter

Secret Squirrel said:
I split my secure database into a BE/FE but now I lose all my permissions
to
my tables. Is this normal or am I doing something wrong?



--
 
P

Pieter Wijnen

I shouldn't think so
My way has however always been

Sub FixRights
Dim Ws AS DAO.WorkSpace
Dim CDb AS DAO.Database, BeDb AS DAO.Database
Dim CCont AS DAO.Container, BECont AS DAO.Container
Dim CDoc AS DAO.Document, BEDoc As DAO.Document
Dim Grp AS DAO.Group ' Assume rights assigned to groups - not users

On Error Resume Next ' No Error handling

Set Ws = Access.DbEngine.Workspaces(0)
Set Cdb = Access.CurrentDb()
Set BEDb = Access.OpenDatabase("BackEnd") ' Substitute..................
For Each CCont In Cdb.Containers
Set BECont = BEDb.Containers(CCont.Name)
For Each CDoc In CCont.Document
Set BEDoc = BECont.Documents(CDoc.Name)
For Each Grp In Ws.Groups
CDoc.UserName = Grp.Name
BEDoc.UserName = CDoc.UserName
CDoc.Permissions = BEDoc.Permissions
Next
Next
Next
' Clean up Objects here ..

End Sub

Pieter
 
G

Guest

And where do I put this code exactly?
Why won't it copy the permissions over when I split the database? All I'm
doing it copying and pasting my original database and then deleting
everything but the tables and then linking them to the FE. Am I missing
something here?
 
P

Pieter Wijnen

in a new module
place the cursor anywhere within the code & hit F5

Pieter

PS if you'd used the "db splitter" wizard it'd done it for you
 
P

Pieter Wijnen

in a new module
place the cursor anywhere within the code & hit F5

Pieter

PS if you'd used the "db splitter" wizard it'd done it for you


Secret Squirrel said:
And where do I put this code exactly?
Why won't it copy the permissions over when I split the database? All I'm
doing it copying and pasting my original database and then deleting
everything but the tables and then linking them to the FE. Am I missing
something here?



--
 
J

Joan Wild

If you used the splitter wizard to split the secure mdb, then yes that is
normal.

Don't use the wizard to split it. If you have a backup of the original, you
can split it manually.

Otherwise, you'll have to join your secure mdw and resecure the backend.
 

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

Similar Threads


Top