I need to work with both a protected and a non-protected Access database at
the same time. The latter I create on the fly.
I've created an Access workgroup file that is needed to open my protected
I open it like this:
Dim MyDB As Database
DBEngine.SystemDB = App.Path & "\myworkgroupfile.MDW"
DBEngine.DefaultUser = "myadminlogin"
DBEngine.DefaultPassword = "secretpassword"
Set MyDB = DBEngine.OpenDatabase(sPath, enOpenExclusively.no,
No problem. Nobody but my programme can get access.
Whilst running my programme I need to create a new database that has no
protection, i.e. is completely open. I create a couple of tables with
corresponding fields and properties and load a few thousand records.
This time I use this:
Dim MyOpenDB As Database
Dim ws As DAO.Workspace
DBEngine.SystemDB = ""
DBEngine.DefaultUser = "admin"
DBEngine.DefaultPassword = ""
Set ws = DBEngine.Workspaces(0)
Set MyOpenDB = ws.CreateDatabase(sFileName, dbLangGeneral)
Now I then try to open the database with the MS-Access and I receive the
following two errors:
1) Record(s) cannot be read;no read permission on 'MSysObjects'
2) Record(s) cannot be read;no read permission on 'MSysACEs'
After these two errors I experience no further erros. I can open and work
with the tables without problems.
What am I missing/doing wrong? Any help much appreciated.
Arne J. Boye-M?ller