Rowfilter with variable

Hi,

I am using the following code to filter by name. The code works fine.

My question is "how do I code the Rowfilter line to use a variable instead of Karen
eg: .Rowfilter="ColumnName = variable"

 

Dim view As DataView = New DataView

With view

.Table = ds.Tables("settings")

.RowFilter = "name = 'karen'"

End With

Any help would be appreciated

Ron



Answer this question

Rowfilter with variable

  • Konstantin Kamanin

    Sorted

    Dim view As DataView = New DataView

    With view

    .Table = ds.Tables("settings")

    .RowFilter = "name = '" & selected & "'"

    End With


  • Rowfilter with variable