根据用户选择创建与sql server的连接 [英] Create a connection to sql server based off of user selection

查看:73
本文介绍了根据用户选择创建与sql server的连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个WFA,它将根据用户选择的内容连接到sql server。是否有SQL Server连接对话框组件?我希望用户能够选择一个sql server和windows帐户或sql server帐户
所以就像一个典型的sql server连接对话框。



Alan

解决方案

您可以使用Visual Studio中使用的相同对话框建立联系。在下面的代码示例中,我将展示如何执行此操作。



特别说明:这是Microsoft的来源,所以如果要使用这个了解
以下许可


 



I am working on an WFA that will connect to a sql server based off what the user selects. Is there a sql server connection dialog component or something? I want the user to be able to select a sql server and either windows account or sql server account So like a typical sql server connection dialog box.


Alan

解决方案

You could use the same dialog used in Visual Studio for making connections. In the following code sample I show how to do this.

MSDN Code sample

If ambitious you can alter the code to have a default server.

I did this in the companion code sample in C#.

Special note: This is Microsoft source so if going to use this understand the following license.

 


这篇关于根据用户选择创建与sql server的连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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