你好64109655,
可以考虑把DataGridView指定列Value取出拼接成SQL作为“In”的过滤条件:
Dim searchString As String = "("
For Each (row As DataGridViewRow In xxxGrid1.Rows)
{
searchString &= "'" & row(CellIndex).Value.ToString() & "',"
}
searchString = searchString.Remove(searchString.Length-1) '移除最后一个英文逗号
searchString &= ")"
'Then you can use Select * From t Where [Code] In
+ 'searchString to query out the data contents you want with 'the help of SqlDataAdapter
If you think one reply solves your problem, please mark it as
An Answer, if you think someone's reply helps you, please mark it as a
Proposed Answer
Help by clicking:
Click here to donate your rice to the poor
Click to Donate
Click to feed Dogs & Cats
Found any spamming-senders? Please report at:
Spam Report