Dynamic sql server selections at runtime with C# and MSSQL
Posted on 2004-11-01
Hi, I can't seem to find any information on how to setup a runtime list of sql server instances for which the user can select which server and database they want to log into. My C# app will be used with a network environment where there could be 1-20 different sql servers and databases they might need to log into. We're using MSSQL and my app is a windows app. I want to have a form pop up when the app is ran which would have a datgrid or list of all the servers available on the network to choose from. It does not matter to me if all of this is stored in the config file or whatever as long as I can provide this. I'm using oledb connections. So they would click on a listbox item and then say press a button to connect to that SQL server and database.
Can someone please help me witht this or provide a link to a sample app that does this. I would really appreciate it. I'm new to C# and .net so could you please provide specific examples. I can use all the help I can get.
Thanks so much!