Question WPF SQL Connection Dialog

NiceGirl13

New member
Joined
Nov 19, 2015
Messages
4
Programming Experience
Beginner
Hello everyone

I have started project where i want the user to be able to connect to a SQL server themselves. The reason for this is that the tables might/hopefully be moved from a test server to production server. however the tables names are static, meaning that the connection dialog should not give the option to connect to a DB nor tables (that should be hard coded in the project. So that ones the user has connected to the Server it loades the table straight away to the main window here it says table displayed). So far i have found some demoes (using VB, and i want to build it in C#).

One of them is:

SQL Server Connection Dialog - CodeProject

I have made a small sketch of my project: the first is the main window. Here is where the table has to be loaded. The 2nd sketch is the connection dialog.

mainscreen.pngconnection.png

Does anyone of you have a guide or links that can help me with this? I hope it makes sense.

Thanks in advanced

Daniel
 
Your question basically amounts to "how do I make my application". This is just a WPF application like any other so you build it like any other. Learn how to build WPF apps and start doing it. When you encounter a specific issue, that would be the time to post here, providing the details of that issue. For instance, how to populate that 'Server Name' field is the sort of question that's appropriate to ask as the subject of a thread. Anything else would go in a different thread specific to that topic.

To address that one issue of how to get a list of available SQL Server instances, look at the SqlDataSourceEnumerator class. It can get you a DataTable containing the server and instance name of each accessible instance, which you can then use to populate your list.
 
Back
Top Bottom