How to Get SQl Server Instance name


  • I am doing a Windows Application in (3.5) with SQL Server 2005 as Back end.

    My task is i am required to get the SQL Server's Server Name in Combo box without logging in SQL Server/ or Instance Name.


    I tried to access via Registry Keys but was unsucessfull as i am hardcoding the key values.


    But is there any was i can get Servername of SQL Server in Combobox.


    OSQL -L did not work, how should i approach this



    Friday, August 26, 2011 12:47 PM

All replies