Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27184

VS 2010 Using "&" in Select Statement

$
0
0
Hi Guys,

I have a datatable where some of the columns have names that include the "&" character. For instance, the name might be "Bob & Tom". It happens that the column datatype is boolean.

When I try to run a select query for all the rows where the column "Bob & Tom" is = True, I get the error "The expression contains unsuppored operator '&'."

My basic code is ...

FilterExpression = "Bob & Tom = 'True'"

Dim FoundRows() as DataRow = Me.Catalog.Select(FilterExpression)

If FoundRows.Count > 0 then
Process the found rows ...
End If

Can anyone advise the correct way to construct the filter expression?

Viewing all articles
Browse latest Browse all 27184

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>