vb.net动态连接字符串 [英] vb.net dynamic connection strings

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

问题描述

我一直在为台式机开发应用程序,在一个公司或sql服务器的一台服务器上具有访问数据库.我有一个连接字符串.现在,我遇到了多个客户端在其自己的服务器上使用我的软件的情况.这意味着不同的连接字符串可以有人建议一种有效的方法,而无需更改整个应用程序中每个服务器的连接字符串吗?

I have always developed apps for desktops with an access database on one server for one company or sql server. I had one connection string. Now I am in a situation with multiple clients using my software on their own server. This means different connection strings can anyone suggest an efficient way to do this without changing connection strings for each server throughout the application?

推荐答案

配置文件或适当的数据文件.

根据您的应用运行的位置, ^ ]或
Configuration files, or data files as appropriate.

Depending on where you app is running, web.config[^], or application.config[^] files are probably the best solution.


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

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