I'm having problems with a DataTable line, the idea is that I want to pull out of a series of rows any rows where one of the column values is in a set of guids. However, I'm getting a guid / string comparison error from the select() function.
The code is as follows:
Dim sb As New StringBuilder
For Each Row As DataRow In dtData.Rows
sb.Append("'")
sb.Append(Row("SomeField").ToString)
sb.Append("', ")
Next
gvDataView.DataSource = dtSubData.Select("SomeField IN (" & sb.ToString.TrimEnd(", ".ToCharArray) & ")")
However, as SomeField is a uniqueidentifier column, dtSubData.select is throwing an error about Guid and String Comparison. With this in mind, is there any way I can work around this issue?