Security changes when opening different databases

G

Guest

I have an application with linked tables. The main application has it's own
workgroup file. I wanted to distribute an update database that would contain
a new set of tables and some additional fields.

I created a utility database that imports all the tables, modifies them,
creates a new database called "Updated Tables" and exports all the modified
tables from my utility to "Updated Tables". I use the same workgroup file
when opening the utility as I do when opening the main application.

The problem: The utility reads the tables database mSysObject file to get a
list of table names to import. When I run it, I get an error 3112 "Records
cannot be read; no read permission on 'MSysObjects'."

Now here is the twist. If I
- Close the utility but leave Access open (remember it was opened using the
special workgroup file)
- I can open the main application (the one the tables link to). No
surprises yet. - - If I now close the main application (leaving Access still
open) and reopen the utility, it runs without the error 3112.

So what changes at a security level when different databases are opened
without Access being closed?
 
G

Guest

NevilleT said:
I have an application with linked tables. The main application has it's own
workgroup file. I wanted to distribute an update database that would contain
a new set of tables and some additional fields.

I created a utility database that imports all the tables, modifies them,
creates a new database called "Updated Tables" and exports all the modified
tables from my utility to "Updated Tables". I use the same workgroup file
when opening the utility as I do when opening the main application.

The problem: The utility reads the tables database mSysObject file to get a
list of table names to import. When I run it, I get an error 3112 "Records
cannot be read; no read permission on 'MSysObjects'."

Now here is the twist. If I
- Close the utility but leave Access open (remember it was opened using the
special workgroup file)
- I can open the main application (the one the tables link to). No
surprises yet. - - If I now close the main application (leaving Access still
open) and reopen the utility, it runs without the error 3112.

So what changes at a security level when different databases are opened
without Access being closed?

The actual code is
strOldTables = Forms!frmUpgrade.txtLocation ' The file to
import from

strSQL = "SELECT DISTINCT MSysObjects.Name, MSysObjects.Type FROM
MSysObjects " & _
"WHERE MSysObjects.Name Not Like ""msys*"" AND
MSysObjects.Type=1;"

Set dbs = OpenDatabase(strOldTables) ' Nominate the
database

Set rst = dbs.OpenRecordset(strSQL) ' Import the
table names

The error occurs here
 

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