@Gmatmut wrote:
I try to make a select from a datatable but I have errors.
First, I create a List of String and try to use Contains operator:
dtInJobData.AsEnumerable.Where(Function( r) (r(“ID”).toString<>"" And r(“Etat”).toString.Contains(listNotInSQL)).CopyToDataTable
with
variable: listNotInSQL
variable type: List < String >
and Default Value: New List(Of String)(New String(){“Terminé”,“En attente”})
but I always have the message Assign: The source contains no DataRows, and it’s not correct.
Secondly, I try to use !Contains operator:
dtInJobData.AsEnumerable.Where(Function( r) (r(“ID”).toString<>"" And !r(“Etat”).toString.Contains(listNotInSQL)).CopyToDataTable
with the same List
and I don’t understand the error message:
Leading ‘.’ or ‘!’ can only appear inside a ‘With’ statementThanks in advance
Posts: 3
Participants: 3