C#:创建数据库窗体表单应用程序和安装向导 [英] C#: creating a database windows form application and installation wizard

查看:111
本文介绍了C#:创建数据库窗体表单应用程序和安装向导的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用SQL数据库在c#上创建了一个Windows窗体应用程序,并创建了一个前提条件.net framework和SQL EXPRESS的设置,它在我的计算机上运行没有问题..但当我拿这个副本安装到另一台计算机应用程序不运行,当我打开任务管理器时,我在后台进程中找到它并在几秒钟后消失..(Windows 10,sqlserver 2012,visual studio 2017)



添加:当我在我的计算机上设置应用程序时,它使用他的包含数据库正常工作



我尝试过:



i试图在另一台计算机上设置sql express和我在计算机上使用的网络框架。

i have create a windows form application on c# using SQL database, and create a setup also with the prerequisites ".net framework and SQL EXPRESS " and it run on my computer with no problem .. but when i take this copy of installation to another computer the application doesn't run and when i open the task manager i find it on the background process and after few seconds gone .. (windows 10, sqlserver 2012, visual studio 2017)

adding : when i setup the application on my computer it work correctly using his including database

What I have tried:

i tried to setup sql express on the other computer and the net framework that i use on my computer .

推荐答案

您不应在安装中包含SQL Server。有几个原因:

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

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

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

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

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

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



如果你想要一个用户数据库系统,那么使用Access,SqlLite或Sql Compact - 不要将SQL Server实例扩展到生产环境!

如果你想要一个多用户数据库系统,那么你需要在客户端站点找到适当的现有SQL Server实例,并将数据库加载到该实例上。
You should not include SQL Server in your installation. There are a couple of reasons:
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.

If you want a single user DB system, then use Access, SqlLite, or Sql Compact - don;t proliferate SQL Server instances to production!
If you want a multi user DB System, then you need to find the appropriate existing SQL Server instance at the client site and load your DB onto that.


这篇关于C#:创建数据库窗体表单应用程序和安装向导的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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