如何使用PC中可用的所有数据库名称填充comboBox [英] how to populate comboBox with all database name available in PC

查看:69
本文介绍了如何使用PC中可用的所有数据库名称填充comboBox的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hii,

有没有解决方法通过选择服务器名称来获取comboBox中PC的所有数据库名称?

hii,
Is there any solution to get all database names available in PC in comboBox by selecting server name?

推荐答案

你可以从您的应用程序连接任何sqlserver数据库并使用ado.net执行该查询。

You can connect any sqlserver database from your application and execute that query with ado.net.
SELECT name as DatabaseName FROM sys.Databases



您将从该sqlserver获取所有数据库名称。


You will got all database name from that sqlserver.


这篇关于如何使用PC中可用的所有数据库名称填充comboBox的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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