How can I display a database open dialog?
Is there a way to display database open dialog from SQL server in my .NET application (the same way I can display a file open开发者_如何转开发 dialog, or font dialog) ?
you can always write custom. I don't think that there is one like open file open dialog, because last one is build into OS.
There is a class called SQLDataSourceEnumerator that should be the best option for you to get a list of available SQL instances (not sure if it works with named instances in SQL Express)
Also, as long as you can connect to an instance of SQL and have access to the master DB, yo ucan use any number of methods in articles on the web to enumerate DBs:
CodeProject
C# Online
Good luck
精彩评论