如何使用Windows窗体和SQL Server数据库创建.exe文件 [英] How to Create .exe file with Windows form and SQL Server Database

查看:230
本文介绍了如何使用Windows窗体和SQL Server数据库创建.exe文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用C#.Net,SQL Server和Crystal Report创建了一个Windows窗体应用程序。现在我想创建该应用程序的exe文件。请帮我这样做。我曾尝试过VS 2010发布向导但它无法绑定数据库文件。

I have created a windows form application with C#.Net, SQL Server and Crystal Report. Now i want to create an exe file of that application. please help me to do so. I had tried VS 2010 publish wizard but it cannot bind the database files.

推荐答案

首先需要注意目标机器是否需要安装SQL Server在它...除非你使用像SQLLite,LocalDB,MySql等等。



你需要编写一些东西来复制数据库...看一下这篇文章使用Installer类轻松部署SQL Server数据库 [ ^ ]



如果您使用的是较小的sql-lokk-alikes之一,那么请查看相关文档以查看您将使用哪些文件需要复制到您的应用程序文件夹中(例如,对于sqllite它是SQLite DLL和MSVCRT.DLL)
Firstly you need to be aware that the target machine will need to have SQL Server already installed on it ... unless you are using something like SQLLite, LocalDB, MySql etc etc.

You will need to script something to copy the database across ... have a look at this article Deploy SQL Server databases easily with an Installer class[^]

If you are using one of the smaller footprint sql-lokk-alikes then check the documentation for them to see which files you will need to copy across into your application folder (e.g. for sqllite it''s SQLite DLL, and MSVCRT.DLL)


在Windows应用程序中创建的自动.exe文件,但是如果要创建应用程序的setup.exe,请通过设置向导...
Automatically .exe file created in windows application but if you want to create setup.exe of your application then go through setup wizard..


这篇关于如何使用Windows窗体和SQL Server数据库创建.exe文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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