DataTable.Select()
-
Hi ! (Sorry for my bad english ;P) I use datatable and i would search if a row exist, i've tried with the Select method but in some rows contains {null} values and i c'ant find how i'll passed this values in the Select string
#I Work in VB.NET dim filter as String = "COL1 = 1 AND COL2 = **null**" If ldataset.Tables("Table1").Select(filter).length Then ....:doh: End If
Thanks in advance :-D -
Hi ! (Sorry for my bad english ;P) I use datatable and i would search if a row exist, i've tried with the Select method but in some rows contains {null} values and i c'ant find how i'll passed this values in the Select string
#I Work in VB.NET dim filter as String = "COL1 = 1 AND COL2 = **null**" If ldataset.Tables("Table1").Select(filter).length Then ....:doh: End If
Thanks in advance :-DTry This
filter = "COL1 = 1 AND IsNull(COL2,-1)=-1" (if COL2 is numeric) filter = "COL1 = 1 AND IsNull(COL2,'')=''" (if COL2 is string)
Free your mind... -
Hi ! (Sorry for my bad english ;P) I use datatable and i would search if a row exist, i've tried with the Select method but in some rows contains {null} values and i c'ant find how i'll passed this values in the Select string
#I Work in VB.NET dim filter as String = "COL1 = 1 AND COL2 = **null**" If ldataset.Tables("Table1").Select(filter).length Then ....:doh: End If
Thanks in advance :-D -
Hi ! (Sorry for my bad english ;P) I use datatable and i would search if a row exist, i've tried with the Select method but in some rows contains {null} values and i c'ant find how i'll passed this values in the Select string
#I Work in VB.NET dim filter as String = "COL1 = 1 AND COL2 = **null**" If ldataset.Tables("Table1").Select(filter).length Then ....:doh: End If
Thanks in advance :-D