I would like to compare the value of a string variable with an entire column of the DataGridView.
There is a code that looks at the whole column, more or less
textbox.Text = datagridview.columns("nome_da_coluna").value
Or do I have to create a loop for this query?
Dim sqlCmd As String = "SELECT COLUNA1, COLUNA2 FROM nome_da_tabela "
cnn = New SqlConnection(strCon)
cmd = New SqlCommand(sqlCmd, cnn)
Dim adpt As New SqlDataAdapter(sqlCmd, cnn)
Dim dts As New DataSet()
Try
cnn.Open()
adpt.Fill(dts, "nome_da_tabela")
datagridview.DataSource = dts