如何在visual studio 2008中使用数据库创建.exe,可以在任何系统上执行 [英] how to create .exe with database in visual studio 2008 which can be executed on any system

查看:66
本文介绍了如何在visual studio 2008中使用数据库创建.exe,可以在任何系统上执行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Everybody



Hello Everybody

I have also added the following connection string in my config file, but still there is error

add name="cn" connectionString="Data Source=AMAN;Initial Catalog=HOSTSDB;User ID=SA;Password=1234
add name="FBTS.Properties.Settings.HOSTSDBConnectionString" connectionstring="Data Source=.;AttachDbFilename=C:\FBTS\FBTS\DB\HOSTSDB.mdf;Initial Catalog=HOSTS;Integrated Security=True" providername="System.Data.SqlClient"

add name="cn" connectionstring="Data Source=AMAN;Initial Catalog=HOSTSDB;User ID=SA;Password=1234"





请帮我如何在其他计算机上运行我的exe



Pls help me how to run my exe on other computer

推荐答案

阅读: http://www.connectionstrings.com/sql-server-2008 [ ^ ]






请看下面的文章。

演练:使用自定义操作在以下位置创建数据库安装 [ ^ ]



希望它有所帮助。
Hi,

take look at the below article.
Walkthrough: Using a Custom Action to Create a Database at Installation [^]

hope it helps.


我创建了新表单并在其中放入了一个文本框。我们必须在该文本框中插入服务器名称,

一旦我们点击提交按钮,它就会更新配置文件中的连接字符串,一旦更改它将在任何机器上执行。



感谢大家的支持。
I created and new form and put a text box in it. We have to insert server name in that text box,
once we click the submit button, it update the connection string in config file, once changed it will executed on any machine.

Thanks all for your support.


这篇关于如何在visual studio 2008中使用数据库创建.exe,可以在任何系统上执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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