Getting the Number of Running SQL Instances running in Network in VB.NET

Initiotech
Posted by Initiotech under Others category on | Views : 3520
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

P.S : Dont Forget to
Import System.Data


Regards
Hefin Dsouza

Comments or Responses

Login to post response