创建安装项目的问题 [英] problem with creating setup project

查看:61
本文介绍了创建安装项目的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我已经使用c#(visual studio 2010)创建了一个winform应用程序,并使用sql server 2008创建了一个数据库.我已经完成了一个安装项目,但问题是:
1-如何将数据库文件放入我的安装项目中?
2-当我在另一台计算机上安装应用程序时,如何在SQL Server 2008 Express中自动附加数据库?

Hi all,
I have created a winform application using c# ( visual studio 2010 ) and a database using sql server 2008. and i have made a setup project but the question is :
1- how to put the database files in my setup project?
2- how can i attach the database automatically in sql server 2008 express when i install the application on another machine?

推荐答案

查看针对类似问题的答案此处 [创建设置并支持使用VS.NET创建数据库 [在安装.NET应用程序期间创建数据库 [部署您的应用程序和数据库 [
Look at the answers given for the similar question asked here[^].
Various article links are present in it that will help you achieve the same.

Have a look at these too:
Creating setup With support for database creation Using VS.NET[^]
Create database during installation of a .NET application [^]
Deploy your Application and Database[^]


我已经使用过 User Instance = True Initial Catalog = MyDBName ,并且问题已解决.
I have used User Instance=True and Initial Catalog=MyDBName in my connection string and the problem had been solved.


这篇关于创建安装项目的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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