Re: Security restrictions and table linking

Tech-Archive recommends: Fix windows errors by optimizing your registry



Rick, That's an excellent idea; Never crossed through my mind...Below is the
code I came up with (works beautifully). The account I'm using for the
RefreshLinkAs function is a specific account that has 'Open/Run'
permissions. However I didn't realize that by removing the 'Open/Run'
permissions for the standard user I'm also removing the ability to run SQL
statements or open the linked tables ;-( (I'm a missing/doing something
else wrong)

Public Function RefreshLinksAs(strFileName As String, AsUsername As String,
Password As String) As Boolean
Dim wrk As DAO.Workspace
Dim dbs As DAO.Database
Dim tdf As DAO.TableDef

Set wrk = DAO.DBEngine.CreateWorkspace("", AsUsername , Password,
dbUseJet)
Set dbs = wrk.OpenDatabase(CurrentDb.Name)

For Each tdf In dbs.TableDefs
If Len(tdf.Connect) > 0 Then
tdf.Connect = ";DATABASE=" & strFileName
Err = 0
On Error Resume Next
tdf.RefreshLink ' Relink the table.
If Err <> 0 Then
RefreshLinksAs = False
Exit Function
End If
End If
Next tdf

RefreshLinksAs = True ' Relinking complete.
dbs.Close
wrk.Close
Set dbs = Nothing
Set wrk = Nothing
End Function


"Rick Brandt" <rickbrandt2@xxxxxxxxxxx> wrote in message
news:7HTKg.5426$tU.5173@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
"John" <noemail@xxxxxxxxxxxxx> wrote in message
news:SkNKg.43929$5i3.31414@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi all! I have a backend that is secured and a frontend (mde) that has
some vba code that re-links the tables to the backend. My question: Is
there any way I can stop a read-only users to open the backend directly?
I tried removing the "Open/Run" permission to the database object for
this user in the backend, but doing that does not allow the user to do
the re-linking when he/she logs on through the frontend.

What I'm trying to do is to avoid the read-only user from seeing the flat
data, as he/she might copy the bulk data outside the application.

Thanks for any ideas or suggestions.

Your code for re-linking can open a new workspace where you specify a
different user (one with more permissions). You have to provide the
username and password in your code to do this so you would want to
distribute only an MDE so the code cannot be viewed.

I'm sorry, but off-hand I don't know the specific code for doing this.
You should be able to find it searching the help file or the web though.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com



.



Relevant Pages

  • Re: Incoming E-Mail - cant create contact in OU
    ... account out of local administrator to attempt to find any denied access. ... I then added full permissions to my user account on both of these keys, ... local admin rights to the server hosting incoming email. ... what permission I need to give the app pool locally to avoid this issue. ...
    (microsoft.public.sharepoint.windowsservices)
  • Re: Incoming E-Mail - cant create contact in OU
    ... account out of local administrator to attempt to find any denied ... I then added full permissions to my user account on both of these keys, ... that's for every app pool you create for every new web app on the ... local admin rights to the server hosting incoming email. ...
    (microsoft.public.sharepoint.windowsservices)
  • Re: Win2k - Account Operator not working properly
    ... You very likely have other ACL issues other than what was mentioned and I can point them out here for you for free or you can pay someone $200-500 an hour to come check it out. ... In order for that to result in inheritence protection it means the schema had to be modified. ... set the account in the GUI to inherit from its parents. ... Used the delegation wizard, on the top level OU, to assign the desired permissions. ...
    (microsoft.public.windows.server.active_directory)
  • Re: Incoming E-Mail - cant create contact in OU
    ... account out of local administrator to attempt to find any denied access. ... I then added full permissions to my user account on both of these keys, ... local admin rights to the server hosting incoming email. ... what permission I need to give the app pool locally to avoid this issue. ...
    (microsoft.public.sharepoint.windowsservices)
  • Consider Windows XP File Security and Group Policies
    ... If you are running Windows XP and are using the NTFS file system, ... Account from being able to purge its history footprint files. ... Changing Folder permissions to Read-Execute instead of Full ... you globally apply Full Control for the Administrators group and the SYSTEM ...
    (microsoft.public.windowsxp.general)