创建c#setup项目后更改连接字符串 [英] Changing connection string after creating c# setup project

查看:84
本文介绍了创建c#setup项目后更改连接字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用c#创建了一个桌面应用程序。然后我创建了安装项目。我还包括appconfig file.Now当我在另一个系统上安装应用程序时,我必须更改连接字符串。但是从哪里可以访问该系统的连接字符串。我已经编写了代码来从appconfig文件中读取连接字符串。

I have created a desktop application using c#. Then i created the setup project. I have also included appconfig file.Now when i install the application on another system i have to change the connection string .But from where can i access the connection string of that system.I have written the code to read connection string from appconfig file.

推荐答案

你可以改变
Data Source=(local);

这意味着我们要连接到SQL服务器实例位于本地计算机上。

This means that we want to connect to the SQL Server instance located on the local machine.


这篇关于创建c#setup项目后更改连接字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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