Link to home
Start Free TrialLog in
Avatar of szadroga
szadrogaFlag for United States of America

asked on

Connect two .MDB files, but one has Security.mdw file applied to it

I have two local DBs, one is blank and the other has test data within it.  The blank database has no security applied to it, but the Testing DB has a security.mdw file applied to it.  I have full access to the security settings and know all the passwords so i can edit the security settings without any issues.

My trouble is when I try linking the test MDB file to the blank MDB file.  I keep getting a permissions issue.  I am not sure what the file is authenticating the connection as since I never get prompted for a userID/password during the linking process.  I tried adding my domain userID to the security of the Test MDB but that did not work.  Any suggestions would be great.

+++I attached a screen shot of the error meesage+++
Permissions-Error.jpg
Avatar of Michael Vasilevsky
Michael Vasilevsky
Flag of United States of America image

How are you linking?
Avatar of szadroga

ASKER

I opened the blank DB and chose Linked Tables...this gave me the option to Browse for the other MDB file which i can locate.  When I try to open the other .MDB file i get the permission error message because that DB has the MDW file applied to it.  Isnt there a way to hard code a connection string with a username and password.  I have a valid username/password to connect into it, but i never get prompted for it when trying to link using the Linked Tables...
Then you'll probably want to use something like the code here:

http://www.mvps.org/access/tables/tbl0010.htm

Your connection string will look something like:

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Desktop\...;User Id=Username;Password=Password;"

The Linked Table manager, Link Table function, and Import objects function will not allow you to pass a username and password. Alternatively you could join the Testing DB mdw workgroup with your blank database as well.
HTH,

MV
Can you further explain the process of joining the Testing DB mdw workgroup with my blank DB?
Also if i were to code the string, where would i enter the code.  I guess i would create a new module...Would the function be something similar to database open()?
the mvps.org site tells how to do it. The string goes in the ConnectString field of a new table callled tblReconnectODBC . Then call the function fReconnectODBC on the startup form OnOpen event. There is no Database OnOpen event as far as I know.
Let me know if you need any other details!
Best,

MV
So i have to create a new Startup form in order to be able to place the code within the OnOpen event?
ASKER CERTIFIED SOLUTION
Avatar of Michael Vasilevsky
Michael Vasilevsky
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ok, i think i am on the right track.  I really appreciate all the help, i will award the points.