[英]How to access SQL Server database in WPF via passing database name
I am using Ado.Net Connectivity Framework in my WPF application. 我在WPF应用程序中使用Ado.Net Connectivity Framework。
There is kind of a form in my MainWindow.xaml
file. 我的
MainWindow.xaml
文件中有一种表单。 This form has two fields one is asking for database name and second is for PC Name. 此表单有两个字段,一个是要求数据库名称,另一个是PC名称。
Questions: 问题:
I want to pass these values to App.config File in my WPF application. 我想将这些值传递给我的WPF应用程序中的App.config文件。 How to pass these values?
如何传递这些值?
Secondly I have to make my database centralized and my application launched from different computers have to access this centralized database? 其次, 我必须集中我的数据库,从不同的计算机启动我的应用程序必须访问这个集中的数据库?
The way I am making this to access centralized database via these above defined fields is right way or is this is not a way to achieve required goal? 我通过以上定义的字段访问集中式数据库的方式是正确的方法还是这不是实现所需目标的方法?
We found an answer based on a good sized chat discussion . 我们根据大小合适的聊天讨论找到了答案。
His solution will probably require 1 of 2 things. 他的解决方案可能需要两件事中的一件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.