如何在客户端PC中安装vs2015桌面应用程序exe与SQL Server数据库而无需安装SQL Server [英] How to install vs2015 desktop application exe with SQL server database in client pc without install SQL server

查看:65
本文介绍了如何在客户端PC中安装vs2015桌面应用程序exe与SQL Server数据库而无需安装SQL Server的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在vs 2015中创建的桌面应用程序和后端使用sql server 2014.

i有50个客户端,窗口7,我没有选择在客户端PC中安装sql server所以如何运行exe与数据库操作



我尝试过:



你好我我曾尝试将数据库作为资源附加,但很多时间在谷歌搜索但却没有找到任何想法。

I have desktop application that created in vs 2015 and back end use sql server 2014 .
i have 50 client with window 7 and i have no option for install sql server in client pc so how to run exe with database operation

What I have tried:

Hello I have tried to attached database as resource but and many time searches in google but dont find any idea.

推荐答案

你没有。

SQL Server的一个实例安装在客户端网络上,它们都连接到它。如果你开始安装SQL服务器实例,那么一切都变得非常混乱:



0)出于版权原因,你只能分发SQL Server Express,而不是SQL Server完整版。

1)他们可能已在网络上安装了SQL Server。如果是这样,那么他们可能会想要使用该版本。

2)如果他们确实安装了SQL服务器并且你开始扩散SQL服务器Express实例,那么你将会惹恼数据库管理员...

3)SQl Server的单站点安装比用户控制下的一些分散版本更有可能被备份。

4)对于普通用户来说,安装和管理Sql服务器非常复杂 - 这不是一个好主意!

5)它将破坏使用Sql Server而不是SqlCE或SQLite的主要优势 - 多用户访问。如果每个人都安装了自己的SQL服务器副本,那么您将拥有数据库的多个副本,每个副本由一个人使用。这会引起一些混乱,并且(取决于你如何编写原始数据库)在实现问题时可能需要付出相当大的努力才能组合成单个实例。



因此,与客户交谈并查看他们是否已经拥有SQL服务器,如果是这样,您需要将数据库添加到该服务器,并可能安排合适的SQL用户访问它 - 他们的数据库管理员应该能够帮助那里。 />


然后您只需要设置应用程序正确使用的连接字符串,并且所有客户端都连接到同一个数据库。如果您的代码设计正确,则字符串将位于外部配置文件中,因此无需重新编译程序即可进行更改。
You don't.
One instance of SQL Server is installed on the client network, and they all connect to that. If you start installing SQL server instances, then it all gets horribly messy:

0) You can only distribute SQL Server Express for copyright reasons - not SQL Server full version.
1) They may already have SQL Server installed on the network. If so, then they will presumably want to use that version.
2) If they do have SQL server installed and you start proliferating SQL server Express instances, you are going to annoy the heck out of the database administrator...
3) A single site installation of SQl Server is a lot more likely to be backed up than a number of scattered version under user control.
4) Sql server is quite complex for a "normal" user to install and administer - it is not a good idea!
5) It will destroy the primary advantage of using Sql Server over SqlCE or SQLite - multiuser access. If everyone installs their own copy of SQL server, then you will have multiple copies of your database, each used by a single person. This will cause some confusion, and (depending on how you wrote the original database) may take some considerable effort to combine into a single instance when the problem is realized.

So talk to the client and see if they already have SQL server, if so, you will need to add your DB to that, and probably arrange a suitable SQL User to access it - their DB admin should be able to help there.

Then all you need is to set the connection string that your app uses correctly, and all clients connect to the same database. If your code is designed correctly, the string will be in an external configuration file, so it's not a problem to change without having to recompile you program.


这篇关于如何在客户端PC中安装vs2015桌面应用程序exe与SQL Server数据库而无需安装SQL Server的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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