Solved Link a table in ReadOnly mode

Capitala

Member
Local time
Today, 20:23
Joined
Oct 21, 2021
Messages
85
Good evening!
I need a code to link a table from an external database (protected with password) so that the linked table will be in ReadOnly mode in the destination database.
Thanks in advance
 
You control that in the external database. Set up a user/password on it that limits the access to only SELECT queries.
 
That is not an option unless the tables are in SQL Server or some other RDBMS. And even then, permissions would be defined at the server, NOT as the tables are linked.

You NEVER expose tables or queries to the user so you could make the form not updateable easily enough.
 
Hi. Are you talking about an external Access database or SQL Server (or some other RDBMS)?
 
not sure you can with linked tables, as Pat says that would normally be handled in the external database

However, depending on what the backend is you can with a query. Assuming the backend is an access db, your query would look something like

Code:
SELECT *
FROM myTable IN '' [ms access;PWD=password;DATABASE=C:\pathtoBE\BEfilename.accdb]

Then change to the query view, open the query (not column) properties and change the Recordset Type from Dynaset to Snapshot
 
The others have emphasized that the backend DB controls this. I'll emphasize the OTHER facet of this problem, which Pat Hartman mentioned. If you are exposing your tables to your users, you have already lost this battle. If you only expose things via a form then you can use the form's abilities to block users from seeing/doing too much.

Search this forum for "Securing a database." That will provide MANY discussions of how to selectively protect your tables.
 

Users who are viewing this thread

Back
Top Bottom