Database security

M

Mail Merge Help

Hi

I have a split databas, one mdb database that have tables only to store
records and an MDE database store all the queries, forms report ect in
another MDE database. Staff login to the mde database via workgroup MDW.

My question is that the MDB database where I store all the data is not
secure, if anyone who is curious could open this MDB database to view records
in the tables and do what ever they like.

When I set a password to the MDB database, I can open the MDE database via
the workgroup.

Is there a way to protect the MDB database from access.

Many thanks and have a nice day
Hong
 
R

Rick Brandt

Mail said:
Hi

I have a split databas, one mdb database that have tables only to
store records and an MDE database store all the queries, forms report
ect in another MDE database. Staff login to the mde database via
workgroup MDW.

My question is that the MDB database where I store all the data is not
secure, if anyone who is curious could open this MDB database to view
records in the tables and do what ever they like.

When I set a password to the MDB database, I can open the MDE
database via the workgroup.

Is there a way to protect the MDB database from access.

Many thanks and have a nice day
Hong

Your MDB should be secured using the same MDW as your front end. Did you
secure and then use the database splitter tool by any chance? That always
produces a non-secure back end. If you split a secure file manually then
both files are secured.
 
M

Mail Merge Help

Hi Rick

Thanks for the advise. I am not the person who designed this database so I
don't know how they split the database. Is there a way to protect my
backend? If I protect my backend the front end doesnt work.

Thanks
 
M

Mail Merge Help

When I set password in my Backend database, then re-link my front end
database. When I log in as developer from the FE, I got a message "Runtime
Error 3031, not a valid password:

I want to write a code so that when any user log in from the front end, via
MDW using their normal log in .

Below is the code that Debug takes me to.

the errors occur at the tdf.RefreshLink

"""""
Function Refresh_Links(lngSpeed As Long, strDatabaseName As String)
'On Error GoTo Handle_Refresh_Links_Error

Dim AdAcctName As String, AdPwd As String
Dim wrkJet As Workspace
Dim db As Database
Dim tdf As TableDef
Dim intI As Integer, intNumTables As Integer
Dim lngOneHundredPercent As Long, lngProgressRatio As Long, lngCounter As
Long, lngcounterstart As Long
Dim lngCounterEndRange As Long, strCurrentDbDir As String



'--------------------------------------------------------------------------------
'Mohan Thavakulasingam 03-07-2002

'--------------------------------------------------------------------------------
'Work out password word of backend for use later below
Application.SetOption "ShowWindowsInTaskbar", False

DoCmd.OpenForm "frmOFS_LinkStatus" ', , , , , , "Re-establishing
Links"
'fSetAccessWindow (SW_HIDE)

'--------------------------------------------------------------------------------
'Mohan Thavakulasingam 03-07-2002

'--------------------------------------------------------------------------------
'Get the width of the progress bar for frmOFS_LinkStatus form
lngOneHundredPercent =
Forms![frmOFS_LinkStatus]![LineShadow].Width 'Overshoot compensation
'Set the moving bar to a widt of zero
Forms![frmOFS_LinkStatus]![LineProgress].Width = 0
'Give a half a second pause so that screen can be refreshed
Pause 0.5
Forms![frmOFS_LinkStatus].Repaint
AdAcctName = GetDevAcctName(AdPwd)
Debug.Print DBEngine.SystemDB
Pause 0.5
Set wrkJet = CreateWorkspace("", AdAcctName, AdPwd, dbUseJet)

Set db = wrkJet.OpenDatabase(CurrentDb.Name)



'--------------------------------------------------------------------------------
'Mohan Thavakulasingam 03-07-2002

'--------------------------------------------------------------------------------
'Count total tables in front end and deduct 7 because I want to
exclude system
'tables and frmOFS_Switchboard table (6 system tables hidden and one
frmOFS_Switchboard table
intNumTables = db.TableDefs.Count - 10.5
'Calculate ration of progression of progress bar
lngProgressRatio = lngOneHundredPercent / intNumTables
'Set the start counter to zero as it will be used by progress bar
lngcounterstart = 0
lngCounterEndRange = lngProgressRatio * intNumTables
' Loop through all tables.
' Reattach those with nonzero-length Connect strings.
intI = 0
strCurrentDbDir = fCurrentDBDir()
For Each tdf In db.TableDefs
' If connect is blank, its not an Linked table

If Len(tdf.Connect) > 0 Then
intI = intI + 1
If tdf.Connect <> "MS Access;PWD=ADAMOFS773;DATABASE=" &
strCurrentDbDir & strDatabaseName Then
tdf.Connect = "MS Access;PWD=ADAMOFS773;DATABASE=" &
strCurrentDbDir & strDatabaseName '";DATABASE=" & strCurrentDbDir &
strDatabaseName & ";PWD=ADAMOFS773"
'tdf.Connect = ";DATABASE=" & strCurrentDbDir &
strDatabaseName & ";PWD=ADAMOFS773"
tdf.RefreshLink ' Problems start here

Pause 0.01
End If

'--------------------------------------------------------------------------------
'Mohan Thavakulasingam 03-07-2002

'--------------------------------------------------------------------------------
'The idea here is for progress bar to progress smoothly to
each milestone
'Here milestone is each table that is refreshed

If lngcounterstart <= lngCounterEndRange Then
For lngCounter = lngcounterstart To (lngCounterEndRange)
Step lngSpeed
Forms![frmOFS_LinkStatus]![LineProgress].Width =
lngCounter
Forms![frmOFS_LinkStatus].Repaint
Next lngCounter
End If
End If

If lngcounterstart <= lngCounterEndRange Then
lngcounterstart = lngCounter
End If
Next tdf
' fSetAccessWindow (0) 'Hide Access Screen

' For lngCounter = lngcounterstart To (lngCounterEndRange) Step
lngSpeed
' Forms![frmOFS_LinkStatus]![LineProgress].Width = lngCounter
' Forms![frmOFS_LinkStatus].Repaint
'Next lngCounter

strglbLinkPath = Get_Link_Path("gictInvestigations")
DoCmd.Close acForm, "frmOFS_LinkStatus", acSaveNo


Refresh_Links_Exit:
Exit Function

Handle_Refresh_Links_Error:
'Modified by Mohan on 11-07-2002
MsgBox Err.Description, vbCritical + vbOKOnly, "Attention!!!"
'MsgBox Err.Description
If Err <> 0 Then
MsgBox "Backend file SHOULD NOT be renamed and should be in the same
directory as the front end..Cannot Proceed!!!", VbExclamation + vbOKOnly,
"Attention!!!"
DoCmd.Quit acQuitSaveAll
Exit Function
End If

Resume Refresh_Links_Exit
End Function
""" Code end here

Could you please see what's the problems is.

Thanks
 

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

Top