.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Sandeep Singh
Melody Anderson
Eminent IT

Home >> Code Snippets >> SQL Query >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Getting the Names of SQL Instances running in the NetWork

Posted By:Hefin Dsouza       Posted Date: August 24, 2009    Points: 10    Category: SQL Query    URL: http://www.dotnetspark.com  

This code sample can be used to get the number of SQL Instances running in your Network.

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim s As Sql.SqlDataSourceEnumerator
s = Sql.SqlDataSourceEnumerator.Instance
Dim dt As DataTable = s.GetDataSources()
DataGridView1.DataSource = dt
End Sub
I have used the DataGridView to display the SQL Instances Details

Hefin Dsouza


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend