Hi All…just want to check if a datatable is null before proceeding further
Use below code
Use if condition
True → null
False-> not null
Depending on the if condition you can design your code accordingly
Dt is Nothing or Dt.Rows.Count=0
You can check by this.
YourDT.Rows.Count=0 orElse YourDT is Nothing
Hi, I don’t want to check the contents of the table whether it is empty or not or whether it contains rows or columns, I want to check if the table itself is Nothing or Null
Thanks this works
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.