Help with combining two like statements
Posted on 2011-02-10
I'm trying to combine to Like statements with the following code (VB.NET):
Dim DVa As New DataView(dta, "Parent_Item like " & "'" & C1TrueDBGrid1.Columns(4).Value & "'" Or "Child_Item like " & "'" & C1TrueDBGrid1.Columns(4).Value & "'", Nothing, DataViewRowState.CurrentRows)
But I'm getting the folowing error:
Conversion from string "Parent_Item like 'M107'" to type 'Long' is not valid.
Can you please help me fix thids problem. The code was working well until I added the second Like statement.