通过ASP.Net中的服务器连接MS-Access数据库 [英] Connecting MS-Access Database Over a Server in ASP.Net

查看:84
本文介绍了通过ASP.Net中的服务器连接MS-Access数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要通过服务器连接MS-Access数据库。

在我的Visual Studio解决方案中,我有两(2)个网站,A& B.

我在网站A中有一个数据库(data.accdb),我需要在网站B中连接该数据库。我使用了计算机上数据库的原始路径,但它工作但是我的需要的是在我托管网站或本地后如何在服务器中连接。

我将如何在下面使用此参数

Provider = Microsoft.ACE.OleDb.12.0; 数据源= \\server\share\folder\myAccessFile.accdb;



需要任何帮助,谢谢

Hi, please i need to connect MS-Access database over a server.
In my Visual Studio Solution, i have two (2) websites, A & B.
I have a database (data.accdb) in website A and i need to connect that database in website B. I used the raw path to the database on the computer and it worked but what i need is how to connect in the server after i have hosted the website or locally.
How will i use this parameter below
Provider=Microsoft.ACE.OleDb.12.0; Data Source=\\server\share\folder\myAccessFile.accdb;

Any help is needed, thanks

推荐答案

在本地计算机上,您可以尝试创建odbc连接。然后,您可以使用访问odbc源的连接字符串。我不知道您是否拥有稍后将托管该网站的网络服务器的管理权限。如果是的话,你可以在那里做同样的事情。如果没有,我不知道另一种选择。



但是:请记住,odbc连接速度不是很快,并且访问对于网站来说不是一个好的数据库解决方案。考虑使用sql server(sql express,如果你的客户没钱)
On your local machine you can try to create an odbc connection. Then you can use an connection string accessing the odbc source. I don't know if you have administrative permissions for the webserver where the website will be hosted later. If yes, you could do the same there. If not, I don't know an alternative.

However: Please keep in mind that odbc connections are not very fast and access is no good database solution for websites. Consider using an sql server (sql express if your customer has no money)


这篇关于通过ASP.Net中的服务器连接MS-Access数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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