Click here to Skip to main content
15,896,278 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I am new to addin development. I have to develop an addin for MS Access that will allow the user to open any database strictly in readonly mode

If not all can we at least make a single database readonly. Hardcode the name and path of the database if required.The DB will be readonly in access but should be appendable/editable using sql scripts fired from my .net project.

Further i will enable or disable this setting based on some registry value so that an authenticated person shall be able to edit the databases.

I would appreciate if we NOT use any username/password based authentication
Posted
Updated 4-Mar-10 17:56pm
v2

1 solution

Any database file opened by Access will be read/write unless you use some form of authentication.

You could use NTFS security permission on a folder or you could use Database Level security.

If you have a mdb file sat on a server, there is nothing stopping someone else opening it with Access directly if you see what i mean. I do not think there is any way to easily achieve what you want without having to use security at some point in the process.

The only way to use some form of Add-in type option via the registry, would be to modify the connection string use to open the database and set the Read-Only flag within it, but this would be bypassable using other software e.g. stand-alone MSAccess, Excel etc.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900