I was creating connection string for sql express database dynamically.I wanted to know how to get the name of the server instance running currently in the local machine,programatically using c#.
I was creating connection string for sql express database dynamically.I wanted to know how
Share
You can use the following code:
Edit:
If you wish to get the instances that are in running state, please refer to this link: http://support.microsoft.com/kb/q287737/