How to link a table from database protected by mdw file

A

Alek Luchnikov

Hello, All!
I need to link with VB a table from database that protected by workgroup
file (mdw) to unprotected db. I have full access to this files, users and
passwords.
Can somebody help me? I am a new user of Access, with little experience.

With best regards, Alek Luchnikov.
 
A

Albert D. Kallal

Remember, anytime you launch ms-access, you MUST be attached to a workgroup
file. So, if you launch your application, you should already be attached to
the correct workgroup file. At this point, your regular re-linking code
should work just fine. I do believe that a user needs read + write
permissions on the tables to re-link (at least that is what is happening for
one of my applications).

If there is security on those linked files, then you have to be attached to
the workgroup BEFORE you start the linking process.

While you can in code open a another database, and specify the workgroup
file, to link to that file..you going to have to have permissions in the
file you are running to build those links. Knowing the workgroup file is not
enough in this case, since the linking objects are in your local database,
but will need permissions set from workgroup file. so, you have to start-up
your mdb using a shortcut to specify the workgroup file. Then, you should
have no problems to re-link.

are you trying to re-link in code, or simply use the linked table manager?
(try using the linked table manager...maybe you can link).

Further, does your mde (or mdb) file already have table links, or do you
need to create those also?

I would test/try the linked table manager...once you can link that way, then
you can use code here:

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

Either way..(code, or link table manager), you have to be joined to the
workgroup first. You can use the workgroup admin tools to join that
workgroup...or simply specify the workgroup in a shortcut you use to launch
the mdb file.

eg:
"C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE"
"C:\Documents and Settings\All Users\Application Data\Rides\RidesXP.mde"
/runtime
/Wrkgrp "\\nite-server\files\RIDES SOFTWARE\Rides.mdw"

The above shortcut would be on one line...but, it does specify the workgroup
file for you..and thus eliminates that need to
join the workgroup file. Use of a shortcut will depend on a case by case
bases.
 
A

Alek Luchnikov

Hello, Albert!
You wrote on Tue, 13 Feb 2007 05:02:15 -0700:

Thank you for you answer. I found exellent example here
http://support.microsoft.com/kb/240222 , but i don't know how to use this
code with mdw protected database.
Ok. I think that I can't link a table from protected db even if know
username and password.


With best regards, Alek Luchnikov.
 
J

Joan Wild

Your best bet in this situation may be to give the Users Group the necessary
permissions in the secured mdb. They'd need Open permission on the database
object, and read data permissions on the table.
 
A

Albert D. Kallal

Alek Luchnikov said:
Hello, Albert!
You wrote on Tue, 13 Feb 2007 05:02:15 -0700:

Thank you for you answer. I found exellent example here
http://support.microsoft.com/kb/240222 , but i don't know how to use
this code with mdw protected database.
Ok. I think that I can't link a table from protected db even if know
username and password.


You simply need to launch the front end mdb, and then use the built in
linked table manager. If the menus are hidden, and you don't actually have
access to the linked table manager, then the developer has to either provide
you with a menu option to link, or you need a way to by-pass the menus to
run the linked table manager. You can try hold down the shift key during
start-up...perhaps the shift key by-pass was left open for this reason.

So, security as a general rule will NOT prevent you from using the built in
linked table manager. However, if the access menus are hidden, then either
the developer will have provided a option, or you need access to the access
menus.

You don't need to write code here. Any reason why you are not using the
linked table manager that comes with ms-access? this feature is built in and
does NOT require you to write any code to use.
 
A

Alek Luchnikov

Hello, Albert!
You wrote on Tue, 13 Feb 2007 08:48:15 -0700:

I just want prevent users modify data in database. I think that a protected
by mdw database more securely than protected by password. I find an example
how to link tables from db protected by password and I think there are an
example how to link tables from db protected by mdw but I can't find them.
If anybody have one give mÕ please link or send by email.

Thank you very much.

With best regards, Alek Luchnikov. E-mail:
(e-mail address removed)
 
A

Albert D. Kallal

I find an example how to link tables from db protected by password and I
think there are an example how to link tables from db protected by mdw but
I can't find them. If anybody have one give mÕ please link or send by
email.

You don't need special code. If you mob file is joined to the workgroup,
then the built in linked table manager should work. Have you tried this?


Once you get the built in linked table manager working, then you will also
be able to use the code here:

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


You do NOT need special code to link tables to a secured database. You
simply must ensue that your current mdb (or mde) file is joined to that
workgroup, and then the standard built in table manger will work just fine,
and also the above code example will also work.

There is perhaps something I not understanding here..but, the built-in
linked table manager should work just fine for you. Have you tried using the
build in linked table manager..and did it work for you?
 
R

Rick Brandt

Alek said:
Hello, Albert!
You wrote on Tue, 13 Feb 2007 08:48:15 -0700:

I just want prevent users modify data in database. I think that a
protected by mdw database more securely than protected by password.
I find an example how to link tables from db protected by password
and I think there are an example how to link tables from db protected
by mdw but I can't find them. If anybody have one give mÕ please link
or send by email.

You cannot create or use a link to a table in a secure MDB unless the file you
are creating the link in was opened using the same workgroup that was used to
secure the secured file. You can open a new workspace in code that uses the
secure workgroup and get at data programmatically, but you cannot create a
persistent link.

Access security has no "shortcuts".
 
J

Joan Wild

Albert D. Kallal said:
There is perhaps something I not understanding here..but, the built-in
linked table manager should work just fine for you. Have you tried using
the build in linked table manager..and did it work for you?

Albert, he wishes to open an unsecured mdb using system.mdw and create a
link to tables in a secured mdb.

While he can create a workspace with the secure mdw and create the links, it
doesn't do much good since all further data interactions with that table
would require he use the secure mdw...but he's using the standard
system.mdw.

The best solution is to either secure the unsecured mdb using the same
secure mdw, or grant the Users Group the necessary permissions in the secure
mdb.
 
A

Alek Luchnikov

Hello, Joan!
You wrote on Wed, 14 Feb 2007 09:58:27 -0500:



JW> Albert, he wishes to open an unsecured mdb using system.mdw and create
JW> a link to tables in a secured mdb.

JW> While he can create a workspace with the secure mdw and create the
JW> links, it doesn't do much good since all further data interactions with
JW> that table would require he use the secure mdw...but he's using the
JW> standard system.mdw.

JW> The best solution is to either secure the unsecured mdb using the same
JW> secure mdw, or grant the Users Group the necessary permissions in the
JW> secure mdb.

Joan you are understanding me. I protect my "secure" database by long
password and I'm happy now ;)
Thank you!

With best regards, Alek Luchnikov. E-mail:
(e-mail address removed)
 
G

Guest

Access security has no "shortcuts".

However, you can use owner permission queries. You only
need permission to create the links, not to use them.

(david)
 
R

Rick Brandt

david@epsomdotcomdotau said:
However, you can use owner permission queries. You only
need permission to create the links, not to use them.

(david)

That would still require that you use the appropriate workgroup unless the
person who set up security gave those permissions to "Admin" or "Users".
 
G

Guest

That would still require that you use the appropriate workgroup unless the
person who set up security gave those permissions to "Admin" or "Users".

????

The users would use the default workgroup, with no extra permissions
given to anything.

The Owner Permission Queries would use owner permissions. You don't
need to use 'an appropriate workgroup' to use an Owner Permission Query.
 
R

Rick Brandt

david@epsomdotcomdotau said:
????

The users would use the default workgroup, with no extra permissions
given to anything.

The Owner Permission Queries would use owner permissions. You don't
need to use 'an appropriate workgroup' to use an Owner Permission
Query.

Have you tried this? If I use the wrong workgroup then the "owner" of the query
will be "Unknown" during the session. It seems to me that that would be asking
Access "let me run this query with the owner's permissions, without having any
idea who that owner is".
 
J

Joan Wild

David, Rick

You're now talking about different things. The OP wanted to open an
unsecure mdb and link to a secure mdb.

So David, there won't be any RWOP queries in the unsecure mdb, so yes you
would need an appropriate workgroup to link to the secure mdb. But if you
are no longer talking about the OP's scenario, then you are right.

Rick, an owner of 'unknown' works just fine for RWOP queries. I do this all
the time (production mdw is different than development mdw and production
doesn't contain the 'owner')
 
G

Guest

Yes, the RWOP queries were MY suggestion. The OP did not
suggest RWOP queries as a possible solution to his problem.

I wasn't doing it explicitly to correct the information that had been
posted.

(david)
 

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