Imports System.Data.SqlClient 'Required name space for sql connection Private Sub PopulateDataGrid() 'Variables Declaration Dim ConnString As String Dim conn As SqlConnection Dim da As SqlDataAdapter Dim ds As New DataSet Dim SqlCmd As SqlCommand ConnString = "Server = localhost;Database = EmployeeDB; Integrated Security = SSPI;" conn = New SqlConnection(strConn) da = New SqlDataAdapter("Select * from Employees", conn) da.Fill(ds, "Employees") ds.Tables(0).PrimaryKey = New DataColumn(ds.Tables(0).Columns("FirstName")) DataGrid1.DataSource = ds.Tables(0) End Sub'Check For employee with the First Name as the passed namePrivate Function CheckForEmployee (ByVal searchName As String) As Boolean Dim drMatchRow As DataRow 'Find For Particular Employee With the given name drMatchRow = ds.Tables(0).Rows.Find(searchName) If drMatchRow Is Nothing Then Return False Else lblMessage.Text = drFind.Item("EmployeeID") Return True End If End Function