如何从C#,SQL和crystal报表创建.exe文件窗口 [英] How to create an .exe file window form C#, SQL and crystal report

查看:79
本文介绍了如何从C#,SQL和crystal报表创建.exe文件窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我是编程新手,我正在开发一个C#windows表单应用程序,因为我已经使用sql server 2008进行数据库而且我也使用了水晶报表,现在我想要创建一个包含数据库和水晶reoprts的.exe文件,请帮助实现这种包含所有类型的.exe文件。



我试过的:



我已经按照下面的链接,它给了.exe文件,但我想要数据库和水晶报告。所以请帮我创建这样的exe文件。



http://www.fordevs.com/2009/07/steps-to-create-setup-and- deployment-project-in-dot-net-vs-2008.html

解决方案

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



您可以在现有实例上安装数据库,也可以让用户安装SQL - 但如果您的应用程序只是单个用户,那么将其转换为使用单个用户数据库(如Access或SqLite)可能会好得多 - 它们根本不需要外部服务器,因此更容易使用。



您显示的链接将包含CR的所有必需DLL文件自动。



但请注意,在生产中你必须知道文件位置 - 在你的app目录中存储任何东西是个坏主意,因为它不太可能有在生产中写权限。这可能会有所帮助:我应该在哪里存储数据? [ ^ ]

Hi Everyone,
I am new to programming, i am working on a C# windows form application, for that i have used sql server 2008 for database and i have used crystal report also, now i want to create a .exe file including database and crystal reoprts, please help to achieve this type of .exe file which includes all.

What I have tried:

I have followed the below link and it gave the .exe file but i want with database and crystal report. so please help me to create such exe file.

http://www.fordevs.com/2009/07/steps-to-create-setup-and-deployment-project-in-dot-net-vs-2008.html

解决方案

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.

You can install your DB on an existing instance, or you can get the user to install SQL - but if your app is only single user you might be a lot better off converting it to use a single user DB such as Access or SqLite instead - they don't need an external server at all and are far easier to work with as a result.

The link you show will include all the necessary DLL files for CR automatically.

But do be aware that in production you have to be aware of file locations - storing anything in your app directory is a bad idea as it is unlikely to have write permissions in production. This may help: Where should I store my data?[^]


这篇关于如何从C#,SQL和crystal报表创建.exe文件窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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