动态连接字符串配置 [英] Dynamic Connection string configuration

查看:73
本文介绍了动态连接字符串配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我希望我的C#winforms项目连接字符串在客户端设置期间(在设置向导中)可配置,以便客户端可以将服务器设置配置为根据他们的数据库服务器名称和密码。

但我一直在考虑如何做到这一点。需要帮助的接力。



使用vs2010和sql server 2008 r2作为数据库。



任何愿意提供帮助的机构都将受到高度赞赏。

Hi,

I want my C# winforms projects connection string configurable during a setup by the client ( within a setup wizard) so that client can configure server setting as per their db-server name and password.
But am stuck thinking how to do that. Relay in need of a help.

am using vs2010 and sql server 2008 r2 as database.

Any body there willing to help will be highly appreciated.

推荐答案

您可以使用安装项目执行此操作。您必须自己编写表单,但这很简单。您甚至可以模拟在其他安装程序上找到的检测服务器功能:



按照此设置安装项目

https://msdn.microsoft.com/en-us/library/vstudio /19x10e5c(v=vs.100).aspx [ ^ ]
You can do this with a setup project. You will have to code the form yourself, but that's pretty easy. You can even emulate the "detect server" functionality you find on other installers:

Follow this to set up an install project
https://msdn.microsoft.com/en-us/library/vstudio/19x10e5c(v=vs.100).aspx[^]


这篇关于动态连接字符串配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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