Hi people.
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
database.
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,
enReadOnly.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'
followed by
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.
Yours Sincerely,
Arne J. Boye-M?ller