Ok, here is the code:
Private Sub DataGridView1_CellClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellClick
'Get the GUID from the DataGridView cell
Dim Person_ID_Guid = Me.DataGridView1.SelectedCells(3).Value
' database connection string
Dim DBConnection2 As String = "Driver={SQL Server};" & "server=GEN2;" & "UID=sa;" & _
"Pwd=password;" & ";database=test"
' sql statment
Dim SQL2 As String = "select ENC_NBR from Encounter where Person_ID = ' " + Person_ID_String + " '"
'create ADODB Connection object
Dim Conn2 As New ADODB.Connection
'create ADODB Recordset object
Dim rs2 As New ADODB.Recordset
'create OleDb Adapter object
Dim daPerson As New OleDbDataAdapter
' finally Dataset to store returned recordset
Dim dsPerson As New DataSet("Person")
'open connection with the string as above
Conn2.Open(DBConnection2, "", "", -1)
'execute the query specifying static sursor, batch optimistic locking
rs2.Open(SQL2, DBConnection2, ADODB.CursorTypeEnum.adOpenStatic, ADODB.LockTypeEnum.adLockBatchOptimistic, 1)
'use the overloaded version of Fill method which takes recordset as parameter
daPerson.Fill(dsPerson, rs2, "Names")
'Setup DatGridView
SetUpDataGridView()
'bind datagrid to dataset and make visable
DataGridView2.DataSource = dsPerson.Tables("Names").DefaultView
DataGridView2.Visible = True
'close the connection
Conn2.Close()
End Sub