tom greene
tom greene

Reputation: 5449

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) ?

Upvotes: 2

Views: 791

Answers (2)

Mike Marshall
Mike Marshall

Reputation: 7850

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

Upvotes: 1

Andrey
Andrey

Reputation: 60115

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.

Upvotes: 1

Related Questions