I am trying to select data from DataTable using ISNUMERIC function, unfortunately I get error below:
System.Data.EvaluateException: "The expression contains the undefined function call ISNUMERIC()."
this is my current code (sorry some parts are in German but to translate I don't think it makes sense)
Public dtFakturas As New DataTable
Artikelgruppe_Einfuegen(rows:=dtFakturas.Select("FAK_KundenNr = " & Adr_Nr &
" AND Liegenschaft = '" & Liegenschaft & "' " &
" AND Mandant = '" & Mandant & "' " &
" AND von = '" & VerrechnungsPeriode.Von & "'" &
" AND bis = '" & VerrechnungsPeriode.Bis & "'" &
" AND FAK_BoMatNr <> ''", "FAK_BoMatNr").Where(Function(r) IsNumeric(r("FAK_BoMatNr"))),
Postable:=PosTable,
Adr_Nr:=Adr_Nr,
Mandant:=Mandant,
Ueberschrift:="", MasterMandantConnectionString:=MastermandantConnectionString,
Verrechnen_bis:=VerrechnungsPeriode.Bis)
Private Function IsNumeric(ByVal o As Object) As Boolean
Dim result_ignored As Decimal
Return o IsNot Nothing AndAlso Not (TypeOf o Is DBNull) AndAlso Decimal.TryParse(Convert.ToString(o), result_ignored)
End Function
my question is: how do i correct a select query to function properly and only give me values that are ISNUMERIC?