完成我的程序后我应该做什么C#,Sql Database [英] What I Should To Do After Finishing My Programs C# , Sql Database

查看:110
本文介绍了完成我的程序后我应该做什么C#,Sql Database的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





i使用c#和sql数据库完成了我的windows应用程序







i finished my windows application using c# and sql database


Data Source=.\\SQLEXPRESS;Initial Catalog=jesalesdb;Integrated Security=SSPI;Trusted_Connection=Yes







我使用visual studio创建了安装文件。



我应该怎样做才能制作我的程序在另一台电脑上工作得很好(连接数据库)



我应该把数据库放在哪里?



谢谢..




and i created setup file using visual studio.

what i should to do to make my program work good on another pc ( connect with database)

and where i should put the database ?

thanks..

推荐答案

您不应该在安装中包含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服务器副本,那么您将拥有数据库的多个副本,每个副本由一个人使用。这会引起一些混乱,并且(取决于你如何编写原始数据库)在实现问题时可能需要付出相当大的努力才能组合成单个实例。



如果您不需要多用户访问您的数据,那么考虑更改您的代码以使用单个用户系统:SQLCE,SQLite,甚至Access
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 don't need multiuser access to your data, then consider changing your code to use a single user system: SQLCE, SQLite, or even Access


如果您真的开发并完成了Windows应用程序甚至创建了安装文件,我想,您需要将其发送给客户,以便运行它。 :-)



但是你有疑问,我会建议制作SQL服务器( SQL Express 和所有SQL Server产品的所有兼容版本)作为先决条件之一;并且您的安装人员可以检查它。这取决于您使用的安装工具包。例如,您可以阅读如何使用 WiX (强烈推荐):

http://www.advancedinstaller.com/forums/viewtopic.php?f=2& t = 24127

http:// wix。 tramontana.co.hu/tutorial/sql/creating-a-database

http://sourceforge.net/p/wix/mailman/message/27011065



为什么不在安装时部署SQL?您可以(检查您的许可证和重新分发的权利),但在这种情况下,最好使其成为可选安装。为什么?因为许可是一个复杂的问题;并且因为用户需要有机会使用他们已经拥有的SQL服务器产品,或者拥有许可证,并且它可能与您使用的不同。通常,安装应该在新计算机上进行测试。您可以将虚拟机用于此目的。



-SA
If you really developed and "finished your Windows application" and even "created setup file", I guess, you need to send it to the customer, to run it. :-)

But as you are in doubt, I would advise to make SQL server (SQL Express and all compatible versions of all SQL Server products) as one of prerequisites; and your installer can check it up. It depends in what installation toolkit you are using. Just for example, you can read how to do it with WiX (highly recommended):
http://www.advancedinstaller.com/forums/viewtopic.php?f=2&t=24127,
http://wix.tramontana.co.hu/tutorial/sql/creating-a-database,
http://sourceforge.net/p/wix/mailman/message/27011065.

Why not deploying SQL with your installation? Probably you can (check up your license and the rights for redistribution), but in this case better make it optional installation. Why? Because licensing is a complicated issue; and because the user need the opportunity to use the SQL server products they already have, or have a license, and it could be different from what you use. Generally, installations should be sometimes tested on a fresh computer. You can use a virtual machine for such purposes.

—SA


这篇关于完成我的程序后我应该做什么C#,Sql Database的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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