访问加载项以只读模式打开数据库 [英] access addin to open db in read-only mode

查看:155
本文介绍了访问加载项以只读模式打开数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Addin开发的新手.我必须为MS Access开发一个插件,该插件将允许用户严格以只读模式打开任何数据库

如果不是全部,我们至少可以将单个数据库设为只读.硬编码数据库的名称和路径(如果需要).数据库在访问中将是只读的,但应使用从.net项目中触发的sql脚本进行附加/可编辑.

此外,我将基于某个注册表值启用或禁用此设置,以便经过身份验证的人员将能够编辑数据库.

如果不使用任何基于用户名/密码的身份验证,我将不胜感激.

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

推荐答案

除非您使用某种形式的身份验证,否则Access将打开/写入的任何数据库文件. br/>
您可以在文件夹上使用NTFS安全性权限,也可以使用数据库级安全性.

如果您在服务器上有一个mdb文件,那么如果您明白我的意思,那么没有什么可以阻止其他人直接使用Access打开它的.我认为没有任何方法可以轻松实现所需的功能,而不必在此过程中的某个时候使用安全性.

通过注册表使用某种形式的加载项类型选项的唯一方法是修改用于打开数据库的连接字符串并在其中设置Read-Only标志,但这可以使用其他软件来绕过.独立的MSAccess,Excel等.
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.


这篇关于访问加载项以只读模式打开数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆