You might want to check the code project for a more polished tool, but
the list of databases is available from a SQL Server instance via
system stored proc:
sp_databases

You can just create a command to call it like any other stored proc
and load the results into a dropdown list.  The permissions are set to
public, so credentials won't be a problem.

Not sure about a list of servers.  They will have to have been
registered by the client PC in some way. First try would be searching
the registry, but if the client doesn't have VS or any SQL tool
installed you probably won't find anything unless they have DNS
entries created by another application. Theoretically you could search
the network for instances (like the slammer worm), but that might be
overkill.

On 4/21/06, Sharon <[EMAIL PROTECTED]> wrote:
> I am trying to create a UI like the one in VS.Net where you create a database connection. A drop down with the list of sql servers, a dropdown with list of databases in the selected server. My problem is how can I get these information. or is there a way where i can use the one in vs.net. I need this to ship with the application.
>
> All help is great help.
>
> Thanks
> Sharon
>
> [Non-text portions of this message have been removed]
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>


--
Dean Fiala
Very Practical Software, Inc
Now with Blogging...
http://www.vpsw.com/blogbaby
Microsoft MVP


YAHOO! GROUPS LINKS




Reply via email to