如何在Internet上连接到ms访问数据库

如何在Internet上连接到ms访问数据库

问题描述:

目前,MS访问数据库文件(.accdb)和使用它的前端应用程序(在VB.17(.exe)中开发)位于同一台PC上。



2-3其他PC /笔记本电脑给出了这个exe的快捷方式。因此,所有计算机都在局域网中使用它。



是否可以将访问数据库文件置于联机状态(Google驱动器/保管箱或任何其他)并通过vb应用程序使用它来自pc?



简而言之,访问互联网和VB应用程序上的数据库文件,以便在PC或笔记本电脑上连接和使用它。 (在Android手机上,如果可能的话)。



我尝试过:



我正在使用局域网,但希望数据库在互联网上,以便可以从任何地方访问。

Currently MS access database file (.accdb) and a front end application to use it( developed in VB.17 (.exe)), is on same PC.

2-3 other PC/Laptop given shortcut of this exe. So all computers are using it in LAN.

Is it possible to put the access database file online (Google drive/ dropbox or any other) and use it through vb application from pc ?

In short, access database file on internet and VB application to connect and use it on PC or Laptop. (and on android phone, if possible).

What I have tried:

I am using LAN but want database to be on internet so that it can be accessed from anywhere.

是的,你可以......但它不是一个好主意。



有很多原因,为什么不这样做,他们开始:

1)多用途 - 这毕竟是互联网的全部!访问根本不是一个好的多用户数据库 - 它可以这样使用,但它总是会产生问题,主要是间歇性的。甚至不要问性能!即使在局域网上,使用多用户数据库系统(如MySQL或MS SQL)也会好得多 - 性能会更好,可靠性也会更好。请记住,当您在另一台计算机上使用Access DB时,所有处理都在本地完成 - 因此所有数据都必须通过网络传输,以确定是否需要它。随着数据库规模的扩大,性能会恶化,因为越来越多的数据涌入网络。使用多用户DB,处理对于DB本身而不是客户端计算机是本地的。添加互联网增加了一层新的缓慢......



2)安全性。要通过互联网使用Access数据库,您需要将其公开用于读取和写入 - 这意味着任何想要检查,更改或删除数据库的人 - 这不是一个好主意!大多数托管服务都隐藏MS SQL和MySQL以免直接访问以获得更好的安全性,而SQL需要在您接近数据库之前登录!



说真的,我不会'做到了。我会按原样(如果您的主机允许)查看MS SQL Server,或者通过服务(您必须编写)更好地查看MS SQL Server,它会向您发出请求并将查询结果返回给您的系统。
Yes, you can ... but it isn't a good idea.

There are quite a few reasons why not, and they start with:
1) Multi Usability - which is after all what the internet is all about! Access is not a good multiuser DB at all - it can be used that way, but it always gives problems, mostly intermittent. And don't even ask about performance! Even on a LAN, you are much better off using a multiuser DB system such as MySQL or MS SQL - the performance will be better, and so will the reliability. Remember that when you use an Access DB on a different computer, all of the processing is done locally - so all of the data has to be transferred over the network to find out if it is needed. As the DB grows in size, the performance worsens because more and more data is flooding the network. With a multiuser DB, the processing is local to the DB itself instead of at the client computer. Adding the internet to this adds a new layer of slowness ...

2) Security. To use an Access DB over the internet, you need to have it publically available for both read and write - which means anyone who wants to to examine, alter, or delete your DB - that's not a good idea! Most hosting services hide MS SQL and MySQL from direct access for better security, and SQL requires a login before you even get close to the DB!

Seriously, I wouldn't do it. I'd look at MS SQL Server either as is (if your host allows) or better via a service (that you'd have to write) which makes the requests for you and returns your query results to your system.


Access是一个基于文件的数据库引擎,所以每个人都应该能够通过Windows或SAMBA共享来使用它。



出于安全性和性能原因,请不要这样做。



如果您需要集中式数据库,则应迁移到正确的数据库服务器(MS SQL Server已升级)方法),你需要更改你的VB源代码。
Access is a file based database engine, so everyone should be able to work with it via a Windows or SAMBA share.

Do not do this for security and performance reasons.

If you need a centralized database you should migrate to a proper database server (MS SQL Server has upgrade methods) and you will need to change your VB source code.