为什么我的网络崩溃了?
在我们学院,我们正在进行一项竞赛,其形式是多项选择题。 为此,我们使用 VB 作为前端,MS Access 作为后端。
Ref:
应用程序 VB 6 运行没有问题,参与者条目已添加到数据库中当 1 或 2 个客户端同时访问数据库时,他们的分数。
问题: 但是当超过 2 个客户端同时访问数据库时,应用程序就会崩溃。
1.在某些客户端中,我们遇到运行时错误,用
打印一些大的负值 消息“操作查询无法修改数据库”。
2.在某些客户端中,VB 6.0突然崩溃并关闭。
当我们尝试使用以下方式访问数据库时会发生这些错误 好的,提交按钮。
您能否告诉我为什么会出现此错误以及如何纠正它。
我的问题是..
1.将所有客户端的负担交给一台笔记本电脑是这里的问题吗?如果还有其他问题,请解释一下。
2.为什么我收到错误“操作查询无法修改数据库”,如果是这样,那么当 1 或 2 个客户端同时访问数据库时它是如何工作的。
In our college, we are conducting a contest, which is in the form of Multiple choice questions.
For that we are using VB as a front-end , MS Access as a back-end.
Ref:
The Application VB 6 runs with no problem and the participant entry is added into the database along with their scores, when 1 or 2 clients access the database simultaneously.
Problem:
But when more than 2 clients access the database simultaneously, the Application crashes.
1.In some clients, we are getting runtimeerror printing some large negative value with a
message "Operations query cannot modify the database".
2.In some clients, the VB 6.0 crashes and closes suddenly.
These errors occurs when we are tried to access the database using
OK,SUBMIT buttons.
Could you tell me why this error occurs and how can I correct it.
My Questions are..
1.Is giving the burden of all clients to a single laptop is the problem here?If there is some other problem please explain it.
2.Why I am getting the error as "Operation query cannot modify database", If so then how it works when 1 or 2 clients access the database simultaneously.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Access 数据库(以及其他直接基于文件的数据库)并不是真正为多访问而构建的。有一些设施可以帮助它工作,但根据我的经验,它相当不可靠。
您需要一个正在运行的数据库服务器,它可以允许多个客户端同时访问同一数据库。免费选项是 MySQL。还有免费版本的 Microsoft SQL Server 可用。
Access databases (and other directly file-based DBs) are not really built for multi-access. There are some facilities in place to help it work, but in my experience, it is quite unreliable.
You need a database server running, which can allow multiple clients to the same database simultaneously. A free option is MySQL. There is also a free version of Microsoft SQL Server available.
“操作查询无法修改数据库”
如果用户没有定义主键,则设计不当的 Access 数据库可能会在尝试修改记录时出现问题。当多人访问时尤其如此,因为如果两个人尝试做同样的事情,它实际上无法判断要修改哪条记录。有时它会让你插入但不允许更新。
此外,如果您追求性能,Access 就是错误的工具。它几乎没有性能调整选项或功能。 SQl Server Express 或 mySQl 将拥有更多可用于诊断和修复性能问题的工具。
"Operation query cannot modify database"
Badly designed Access databases can have issues with users trying to modify records if they don't have defined Primary keys. This is especially true when multiple people are accessing because it literally can't tell which record to modify if two people try to do the same thing. Sometimes it will let you insert but not update.
Further if you are looking for performance, Access is just the wrong tool. It has very little in the way of performance tuning options or abilities. SQl Server Express or mySQl would have more things available to diagnose and fix a performance issue.