简体   繁体   English

Sql server 多用户访问数据库

[英]Multiple user access database with Sql server

I have an access database that is stored on a network drive where all users access the one file.我有一个存储在网络驱动器上的访问数据库,所有用户都可以在其中访问一个文件。 The database is linked to Sql server tables located in a local on site server.该数据库链接到位于本地站点服务器中的 Sql 服务器表。 In my vba code my connection is to the access database.在我的 vba 代码中,我的连接是访问数据库。 My question is I know it's possible to just connect to sql server from vba but all my queries are stored in Access, so will my code be able to run the queries from access if it's connected to Sql server or would I need to re-write all the queries?我的问题是我知道可以从 vba 连接到 sql server 但我所有的查询都存储在 Access 中,所以如果它连接到 Sql server 或者我需要重新编写,我的代码是否能够从 access 运行查询所有的查询? The problem we are having is that more than one user may be on the same record pulled up and they are overwriting each other's changes.我们遇到的问题是多个用户可能在同一条记录上被拉起,并且他们正在覆盖彼此的更改。 Also a user may need to take the program on their laptop instead of having to remote in to their desktop at office.此外,用户可能需要在他们的笔记本电脑上运行该程序,而不必在办公室远程访问他们的桌面。 I was thinking I could just give them a copy each and that would solve the problem.我想我可以给他们一个副本,这样就可以解决问题。 Does anyone have any answers?有没有人有任何答案?

Just re-write the queries in SQL Server.只需在 SQL Server 中重新编写查询即可。 It may be painful now, but it shouldn't be too bad, and down the road a bit, you'll be glad you moved everything to SQL Server (much faster, more stable, you're using a real DB, etc.)现在可能会很痛苦,但应该不会太糟糕,并且在未来一段时间内,您会很高兴将所有内容都移至 SQL Server(更快、更稳定,您使用的是真正的数据库等)。 )

您需要将所有查询拉入 VBA 并使用适当的参数重写它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM