从表格读取数据时如何防止打开MS Access数据库 [英] How to prevent to open a MS Access Database while reading data from forms

查看:41
本文介绍了从表格读取数据时如何防止打开MS Access数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

要使用vb.net从MS-Access表单中计数Activex控件,我正在使用以下连接.

To count Activex controls from MS-Access forms using vb.net I am using the connection as follws..

oDBEngine = oAccess.DBEngine oDB = oDBEngine.OpenDatabase(名称:= strFullFileName,选项:= False,ReadOnly:= False,Connect:=")

oDBEngine = oAccess.DBEngine oDB = oDBEngine.OpenDatabase(Name:=strFullFileName, Options:=False, ReadOnly:=False, Connect:="")

并以 Design模式打开表单,因为有一个用户输入提示表单,如果我们在默认"视图中打开该应用程序,该表单将阻止我们进一步运行该应用程序.

and Openning the forms in Design mode, as there is a user input prompt form which prevents us to run the application further if we open it in Default view.

oAccess.DoCmd.OpenForm(FormName:= objForms.Name,View:= AcFormView.acDesign)

oAccess.DoCmd.OpenForm(FormName:=objForms.Name, View:=AcFormView.acDesign)

现在的问题是:

将打开数据库,并在运行应用程序时打开所有表单.无论如何,我们只是在阅读表单时阻止打开数据库和表单.

The DataBase gets opens and along with that all the forms open up while running the application. Is there anyway we just prevent to open the database and forms, while reading the forms.

谢谢.

推荐答案

听起来像未拆分的应用程序(单个MDB文件中的表和表格/等),并且被多个用户共享.这是灾难性的情况.请参阅将Microsoft Access MDB分为前端和后端所有细节.

Sounds like an unsplit application (tables and forms/etc. in a single MDB file), and that it's being shared by multiple users. This is a disastrous scenario. See Splitting your Microsoft Access MDB into a front end and back end for all the details.

一旦拆分,您将处理单个副本,然后将更新分发给用户.关键是,从2000版开始,Access MDB的设计(与 data 相对)在任何用户打开时都无法编辑.

Once it's split, you'd work on an individual copy and then distribute updates to users. The point is that since version 2000 the design of an Access MDB (as opposed to the data) cannot be edited while it's open by any users.

这篇关于从表格读取数据时如何防止打开MS Access数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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