在Intranet上使用Access DB部署VB.Net应用程序 [英] Deploying VB.Net application with Access DB on intranet

查看:69
本文介绍了在Intranet上使用Access DB部署VB.Net应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我在vb.net和ms-access数据库上开发了一个学校应用程序。我已经在独立计算机和欢呼声中进行了部署。现在我需要将它部署在4-5台PC的本地Intranet上。但我不知道如何实现这一目标。我希望我的应用程序从中心点访问数据库,所有用户使用相同的数据库。我需要帮助。谢谢



Ovais

解决方案

要看的是通常设置的连接字符串在.exe.config文件中。

这意味着:在某处部署数据库,调整.exe.config文件中的连接字符串,然后使用修改后的.exe.config文件部署应用程序。最后一步(部署修改后的文件)可以通过msi中的自定义操作或软件分发系统来实现。


1.在服务器计算机上定位数据库文件。 />


2.修改你的连接字符串以访问它。

如果你使用OLEDB驱动连接访问你可以使用连接字符串作为

Provider = Microsoft.ACE.OLEDB.12.0;

Data Source = \\server\share\folder\myAccessFile.accdb;



3.在您的机器上查找OLEDB数据提供程序并修改连接字符串。



-

谢谢


 <   connectionstrings  >  
< add 名称 = ConnectionString1 >
connectionString =Provider = Microsoft.Jet.OLEDB.4.0; Data Source = | DataDirectory | \ UltraSchoolDB.mdb; Persist Security Info = True; Jet OLEDB:Database Password = mypassword
providerName =System.Data。 OleDb/>
< / add > < / connectionstrings >


Hi all,

I've developed an application for school on vb.net and ms-access database. I've experienced its deployment on stand alone computer and cheers.. Now i need to deploy it on local intranet of 4-5 PCs. But i don't know how to achieve this. I want my application to access database from a central point and all users uses the same database. I need a help on it. Thanks

Ovais

解决方案

The thing to look at is the "connection string" which is normally set in the .exe.config file.
That means: deploy your database somewhere, adjust the connection string in the .exe.config file, and then deploy your application with the modified .exe.config file. The last step (deploy the modified file) could be achieved by a custom action in the msi or by a software distribution system.


1.Locate your database file on a server machine.

2.Modify your connection string to access it.
if your using OLEDB driver to connect to access you can use connection string as
Provider=Microsoft.ACE.OLEDB.12.0;
Data Source=\\server\share\folder\myAccessFile.accdb;

3. Find OLEDB data provider on your machine and modify connection string.

--
Thanks


<connectionstrings>
        <add name="ConnectionString1">
            connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\UltraSchoolDB.mdb;Persist Security Info=True;Jet OLEDB:Database Password=mypassword"
            providerName="System.Data.OleDb" />
    </add></connectionstrings>


这篇关于在Intranet上使用Access DB部署VB.Net应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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