Please help for import or link a table from a secured database

G

Guest

Dear all,

When I try to import a table from a secured database (I set up the security
for this database) to another secured database, the following information was
shown up:

You do not have the necessary permission to the ‘*.mdb’ object. Have your
system administrator or the person who created this object establish the
appropriate permissions

Please help me for this problem. How can I set the appropriate permissions
for it?

Thank you very much.

Blinda
 
J

John Nurick

Hi Blinda,

The best thing to do if your security concerns permit is to set things
up so both databases are secured with the same workgroup security (mdw)
database. Then you just have to log in with a user account that has
appropriate permissions on both databases, off you go.

Otherwise - i.e. if the two databases are secured by different mdw files
- as far as I know you'll have to open a second instance of Access using
the second mdw file. See e.g.

How To Automate a Secured Access Database Using Visual Basic
http://support.microsoft.com/?id=192919
 
G

Guest

Hi John,

Thank you very much for your help. The problem is that the two database are
secured with the different workgroup security (mdw). Can I just change the
shortcut target and include one of the .mdw for another database?
Thank you,

Blinda
 
J

John Nurick

As far as I know, if you have two databases secured with two different
mdw files, you have to use two instances of Access, one using each mdw.
But I'm not a security expert; it might be worth asking in the Security
newsgroup microsoft.public.access.security .
 
G

Guest

John,

Thank you very much. When I use the way you told me at
http://support.microsoft.com/?id=192919, it opened my secured database (to be
imported) without asking for usename and password. But I still do not know
how to import the secured tables.

Thank you anyway. If you happen know where can I get the information, please
let me know. Thanks.

Blinda
 
J

John Nurick

Blinda,

Have you tried importing the data while the other database is open?

I haven't tried this for myself and don't have secured databases here to
try it on, but I would expect that all that's necessary is something
like this (based on the code in 192919):

...
On Error GoTo WAITFORACCESS
Set accObj = GetObject(, "Access.Application")

' Turn off error handling
On Error GoTo 0

'import data
DoCmd.TransferDatabase acImport, "Microsoft Access", _
"D:\Folder\Other Database.mdb", acTable, "OldTable", "NewTable"

'or the SQL way
CurrentDB.Execute "INSERT INTO NewTable " _
& "SELECT * FROM OldTable IN 'D:\Folder\Other Database.mdb';"

...
accObj.CloseCurrentDatabase
accObj.Quit

Set accObj = Nothing


If you want to import the data manually, try splitting the 192919 code
into two procedures, one that opens the other database and leaves it
open; and the other, to be run after the importing, that closes the
other database.

A quite different approach, of course, is
1) open Access using the default system.mdw

2) create a new blank mdb file (which will not be secured)

3) close Access, re-open the secured mdb you want to import from, and
export the table(s) to the unsecured mdb

5) open the secured mdb you want to import into, and import from the
unsecured mdb

6) destroy the unsecured mdb.
 
G

Guest

John,

Thank you so much. I tried with the part of your import code to import
tables, still has the same information of :

You do not have the necessary permission to the ‘*.mdb’ object. Have your
system administrator or the person who created this object establish the
appropriate permissions

I used the way your suggested as "a quite different approch", and it solved
my problem.

Thank you and you have a good day,

Blinda
 

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