How to Get SQl Server Instance name


i doing windows application in c#.net (3.5) sql server 2005 end.

my task required sql server's server name in combo box without logging in sql server/ or instance name.

 

i tried access via registry keys unsucessfull hardcoding key values.

 

but there can servername of sql server in combobox.

 

osql -l did not work, how should approach this

 

 

check this

http://msdn.microsoft.com/en-us/library/system.data.sql.sqldatasourceenumerator.getdatasources.aspx


if post answers question, please click "mark answer". if post helpful please click "mark helpful".


Visual Studio Languages  ,  .NET Framework  >  Visual C#



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

job syspolicy_purge_history job fail in sqlserver 2008

Trying to register with public marketplace error with 'Get-AzureStackStampInformation'